qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 2/3] hw/usb: Declare QOM macros using QDEV_DECLARE_DEV_BUS_TY


From: Philippe Mathieu-Daudé
Subject: [RFC PATCH 2/3] hw/usb: Declare QOM macros using QDEV_DECLARE_DEV_BUS_TYPES()
Date: Mon, 13 Feb 2023 11:56:08 +0100

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/hw/usb.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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;
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]