Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
RFC Other devices don't use such helper. Maybe it should
be the other way around, introduce more bus_from_device()
helpers?
---
hw/usb/bus.c | 10 +++++-----
hw/usb/core.c | 6 +++---
hw/usb/dev-hub.c | 4 ++--
hw/usb/dev-serial.c | 10 +++++-----
hw/usb/hcd-xhci.c | 2 +-
include/hw/usb.h | 5 -----
6 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index d7c3c71435..4a1b67761c 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -427,7 +427,7 @@ void usb_unregister_port(USBBus *bus, USBPort *port)
void usb_claim_port(USBDevice *dev, Error **errp)
{
- USBBus *bus = usb_bus_from_device(dev);
+ USBBus *bus = USB_BUS(qdev_get_parent_bus(DEVICE(dev)));