diff mbox series

[PATCH-for-6.0,v2,2/4] hw/usb/hcd-xhci: Restrict TYPE_XHCI to hw/usb/

Message ID 20201109135300.2592982-3-philmd@redhat.com
State New
Headers show
Series hw/usb/hcd-xhci: Fix USB_XHCI_NEC device | expand

Commit Message

Philippe Mathieu-Daudé Nov. 9, 2020, 1:52 p.m. UTC
TYPE_XHCI is not a generic device meant to be instantiated by
QOM objects outside of hw/usb/. Do not expose the type in public
namespace (via include/).

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/usb/hcd-xhci.h     | 1 +
 include/hw/usb/xhci.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Henderson Nov. 12, 2020, 9:23 p.m. UTC | #1
On 11/9/20 5:52 AM, Philippe Mathieu-Daudé wrote:
> TYPE_XHCI is not a generic device meant to be instantiated by

> QOM objects outside of hw/usb/. Do not expose the type in public

> namespace (via include/).

> 

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---

>  hw/usb/hcd-xhci.h     | 1 +

>  include/hw/usb/xhci.h | 1 -

>  2 files changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h
index ccf50ae28be..f7150a7e12b 100644
--- a/hw/usb/hcd-xhci.h
+++ b/hw/usb/hcd-xhci.h
@@ -27,6 +27,7 @@ 
 #include "hw/usb/xhci.h"
 #include "sysemu/dma.h"
 
+#define TYPE_XHCI "base-xhci"
 OBJECT_DECLARE_SIMPLE_TYPE(XHCIState, XHCI)
 
 /* Very pessimistic, let's hope it's enough for all cases */
diff --git a/include/hw/usb/xhci.h b/include/hw/usb/xhci.h
index 5c90e1373e5..90b56429199 100644
--- a/include/hw/usb/xhci.h
+++ b/include/hw/usb/xhci.h
@@ -1,7 +1,6 @@ 
 #ifndef HW_USB_XHCI_H
 #define HW_USB_XHCI_H
 
-#define TYPE_XHCI "base-xhci"
 #define TYPE_NEC_XHCI "nec-usb-xhci"
 #define TYPE_QEMU_XHCI "qemu-xhci"
 #define TYPE_XHCI_SYSBUS "sysbus-xhci"