[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-6.0 5/5] hw/usb/hcd-xhci-pci: Rename "pci-xhci" as TYPE_XHCI_
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-6.0 5/5] hw/usb/hcd-xhci-pci: Rename "pci-xhci" as TYPE_XHCI_PCI_COMMON |
Date: |
Sat, 7 Nov 2020 12:13:07 +0100 |
Follow the code base style by using the _COMMON suffix to
abstract QOM types.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/usb/hcd-xhci-pci.h | 4 ++--
hw/usb/hcd-xhci-nec.c | 2 +-
hw/usb/hcd-xhci-pci.c | 16 ++++++++--------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/usb/hcd-xhci-pci.h b/hw/usb/hcd-xhci-pci.h
index cf9a180caa4..c862e82d964 100644
--- a/hw/usb/hcd-xhci-pci.h
+++ b/hw/usb/hcd-xhci-pci.h
@@ -27,8 +27,8 @@
#include "hw/usb.h"
#include "hcd-xhci.h"
-#define TYPE_XHCI_PCI "pci-xhci"
-OBJECT_DECLARE_SIMPLE_TYPE(XHCIPciState, XHCI_PCI)
+#define TYPE_XHCI_PCI_COMMON "pci-xhci"
+OBJECT_DECLARE_SIMPLE_TYPE(XHCIPciState, XHCI_PCI_COMMON)
typedef struct XHCIPciState {
/*< private >*/
diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c
index 5707b2cabd1..16b3b46fd59 100644
--- a/hw/usb/hcd-xhci-nec.c
+++ b/hw/usb/hcd-xhci-nec.c
@@ -52,7 +52,7 @@ static void nec_xhci_class_init(ObjectClass *klass, void
*data)
static const TypeInfo nec_xhci_info = {
.name = TYPE_NEC_XHCI,
- .parent = TYPE_XHCI_PCI,
+ .parent = TYPE_XHCI_PCI_COMMON,
.class_init = nec_xhci_class_init,
};
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index 2ca018a4290..9490988b1c9 100644
--- a/hw/usb/hcd-xhci-pci.c
+++ b/hw/usb/hcd-xhci-pci.c
@@ -80,14 +80,14 @@ static void xhci_pci_intr_raise(XHCIState *xhci, int n,
bool level)
static void xhci_pci_reset(DeviceState *dev)
{
- XHCIPciState *s = XHCI_PCI(dev);
+ XHCIPciState *s = XHCI_PCI_COMMON(dev);
device_legacy_reset(DEVICE(&s->xhci));
}
static int xhci_pci_vmstate_post_load(void *opaque, int version_id)
{
- XHCIPciState *s = XHCI_PCI(opaque);
+ XHCIPciState *s = XHCI_PCI_COMMON(opaque);
PCIDevice *pci_dev = PCI_DEVICE(s);
int intr;
@@ -105,7 +105,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev,
Error **errp)
{
int ret;
Error *err = NULL;
- XHCIPciState *s = XHCI_PCI(dev);
+ XHCIPciState *s = XHCI_PCI_COMMON(dev);
dev->config[PCI_CLASS_PROG] = 0x30; /* xHCI */
dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin 1 */
@@ -165,7 +165,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev,
Error **errp)
static void usb_xhci_pci_exit(PCIDevice *dev)
{
- XHCIPciState *s = XHCI_PCI(dev);
+ XHCIPciState *s = XHCI_PCI_COMMON(dev);
/* destroy msix memory region */
if (dev->msix_table && dev->msix_pba
&& dev->msix_entry_used) {
@@ -187,7 +187,7 @@ static const VMStateDescription vmstate_xhci_pci = {
static void xhci_instance_init(Object *obj)
{
- XHCIPciState *s = XHCI_PCI(obj);
+ XHCIPciState *s = XHCI_PCI_COMMON(obj);
/*
* QEMU_PCI_CAP_EXPRESS initialization does not depend on QEMU command
* line, therefore, no need to wait to realize like other devices
@@ -211,7 +211,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo xhci_pci_info = {
- .name = TYPE_XHCI_PCI,
+ .name = TYPE_XHCI_PCI_COMMON,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(XHCIPciState),
.class_init = xhci_class_init,
@@ -235,7 +235,7 @@ static void qemu_xhci_class_init(ObjectClass *klass, void
*data)
static void qemu_xhci_instance_init(Object *obj)
{
- XHCIPciState *s = XHCI_PCI(obj);
+ XHCIPciState *s = XHCI_PCI_COMMON(obj);
XHCIState *xhci = &s->xhci;
s->msi = ON_OFF_AUTO_OFF;
@@ -247,7 +247,7 @@ static void qemu_xhci_instance_init(Object *obj)
static const TypeInfo qemu_xhci_info = {
.name = TYPE_QEMU_XHCI,
- .parent = TYPE_XHCI_PCI,
+ .parent = TYPE_XHCI_PCI_COMMON,
.class_init = qemu_xhci_class_init,
.instance_init = qemu_xhci_instance_init,
};
--
2.26.2
- RE: [PATCH-for-5.2 1/5] hw/usb/hcd-xhci: Make xhci base model abstract, (continued)
[PATCH-for-5.2 2/5] hw/usb/Kconfig: Fix USB_XHCI_NEC (depends on USB_XHCI_PCI), Philippe Mathieu-Daudé, 2020/11/07
[PATCH-for-6.0 3/5] hw/usb/hcd-xhci: Rename "base-xhci" as TYPE_XHCI_COMMON, Philippe Mathieu-Daudé, 2020/11/07
[PATCH-for-6.0 4/5] hw/usb/hcd-xhci-pci: Use OBJECT_DECLARE_SIMPLE_TYPE() macro, Philippe Mathieu-Daudé, 2020/11/07
[PATCH-for-6.0 5/5] hw/usb/hcd-xhci-pci: Rename "pci-xhci" as TYPE_XHCI_PCI_COMMON,
Philippe Mathieu-Daudé <=