From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org, Eduardo Habkost <eduardo@habkost.net>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Edgar E . Iglesias" <edgar.iglesias@gmail.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
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 [thread overview]
Message-ID: <20230213105609.6173-3-philmd@linaro.org> (raw)
In-Reply-To: <20230213105609.6173-1-philmd@linaro.org>
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
next prev parent reply other threads:[~2023-02-13 10:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 10:56 [RFC PATCH 0/3] qdev: Introduce QDEV_DECLARE_DEV_BUS_TYPES() macro Philippe Mathieu-Daudé
2023-02-13 10:56 ` [RFC PATCH 1/3] hw/qdev: " Philippe Mathieu-Daudé
2023-03-01 14:59 ` Daniel P. Berrangé
2023-02-13 10:56 ` Philippe Mathieu-Daudé [this message]
2023-02-13 10:56 ` [RFC PATCH 3/3] hw/usb: Use USB_DEVICE_GET_BUS() macro Philippe Mathieu-Daudé
2023-03-01 14:42 ` [RFC PATCH 0/3] qdev: Introduce QDEV_DECLARE_DEV_BUS_TYPES() macro Igor Mammedov
2023-03-01 15:02 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230213105609.6173-3-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=eduardo@habkost.net \
--cc=imammedo@redhat.com \
--cc=kraxel@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).