@@ -242,4 +242,14 @@ int usb_desc_get_descriptor(USBDevice *dev, USBPacket *p,
int usb_desc_handle_control(USBDevice *dev, USBPacket *p,
int request, int value, int index, int length, uint8_t *data);
+const char *usb_device_get_product_desc(USBDevice *dev);
+
+const USBDesc *usb_device_get_usb_desc(USBDevice *dev);
+
+struct USBDescString {
+ uint8_t index;
+ char *str;
+ QLIST_ENTRY(USBDescString) next;
+};
+
#endif /* QEMU_HW_USB_DESC_H */
@@ -192,12 +192,6 @@ typedef struct USBDescOther USBDescOther;
typedef struct USBDescString USBDescString;
typedef struct USBDescMSOS USBDescMSOS;
-struct USBDescString {
- uint8_t index;
- char *str;
- QLIST_ENTRY(USBDescString) next;
-};
-
#define USB_MAX_ENDPOINTS 15
#define USB_MAX_INTERFACES 16
@@ -555,10 +549,6 @@ int usb_device_alloc_streams(USBDevice *dev, USBEndpoint **eps, int nr_eps,
int streams);
void usb_device_free_streams(USBDevice *dev, USBEndpoint **eps, int nr_eps);
-const char *usb_device_get_product_desc(USBDevice *dev);
-
-const USBDesc *usb_device_get_usb_desc(USBDevice *dev);
-
/* quirks.c */
/* In bulk endpoints are streaming data sources (iow behave like isoc eps) */
@@ -9,6 +9,7 @@
#include "monitor/monitor.h"
#include "trace.h"
#include "qemu/cutils.h"
+#include "desc.h"
static void usb_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent);
USBDescString is forward-declared. Only bus.c uses the usb_device_get_product_desc() and usb_device_get_usb_desc() function. Move all that to the "desc.h" header to reduce the big "hw/usb.h" header a bit. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/usb/desc.h | 10 ++++++++++ include/hw/usb.h | 10 ---------- hw/usb/bus.c | 1 + 3 files changed, 11 insertions(+), 10 deletions(-)