diff mbox series

[RFC,2/3] hw/usb: Declare QOM macros using QDEV_DECLARE_DEV_BUS_TYPES()

Message ID 20230213105609.6173-3-philmd@linaro.org
State New
Headers show
Series qdev: Introduce QDEV_DECLARE_DEV_BUS_TYPES() macro | expand

Commit Message

Philippe Mathieu-Daudé Feb. 13, 2023, 10:56 a.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/hw/usb.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/hw/usb.h b/include/hw/usb.h
index b2111bb1c7..09f345f5c5 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -266,8 +266,11 @@  struct USBDevice {
     const USBDescIface  *ifaces[USB_MAX_INTERFACES];
 };
 
+#define TYPE_USB_BUS "usb-bus"
 #define TYPE_USB_DEVICE "usb-device"
-OBJECT_DECLARE_TYPE(USBDevice, USBDeviceClass, USB_DEVICE)
+
+QDEV_DECLARE_DEV_BUS_TYPES(USBDevice, USBDeviceClass, USB_DEVICE,
+                           USBBus, USB_BUS)
 
 typedef void (*USBDeviceRealize)(USBDevice *dev, Error **errp);
 typedef void (*USBDeviceUnrealize)(USBDevice *dev);
@@ -473,9 +476,6 @@  void hmp_info_usbhost(Monitor *mon, const QDict *qdict);
 
 /* usb-bus.c */
 
-#define TYPE_USB_BUS "usb-bus"
-OBJECT_DECLARE_SIMPLE_TYPE(USBBus, USB_BUS)
-
 struct USBBus {
     BusState qbus;
     USBBusOps *ops;