diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2012-02-27 15:18:47 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-27 15:40:53 +0100 |
commit | 3741715cf2e54727fe3d9884ea6dcea68c7f7d4b (patch) | |
tree | 99dfc7e4ca9c85e5fd3ace161b125169ae4c87e8 /hw/usb-serial.c | |
parent | e64722108c1342d499d408c386ce65794c44dd63 (diff) | |
download | qemu-3741715cf2e54727fe3d9884ea6dcea68c7f7d4b.zip qemu-3741715cf2e54727fe3d9884ea6dcea68c7f7d4b.tar.gz qemu-3741715cf2e54727fe3d9884ea6dcea68c7f7d4b.tar.bz2 |
usb: Resolve warnings about unassigned bus on usb device creation
When creating an USB device the old way, there is no way to specify the
target bus. Thus the warning issued by usb_create makes no sense and
rather confuses our users.
Resolve this by passing a bus reference to the usbdevice_init handler
and letting those handlers forward it to usb_create.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-serial.c')
-rw-r--r-- | hw/usb-serial.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/usb-serial.c b/hw/usb-serial.c index 52676e8..0aae379 100644 --- a/hw/usb-serial.c +++ b/hw/usb-serial.c @@ -492,7 +492,7 @@ static int usb_serial_initfn(USBDevice *dev) return 0; } -static USBDevice *usb_serial_init(const char *filename) +static USBDevice *usb_serial_init(USBBus *bus, const char *filename) { USBDevice *dev; CharDriverState *cdrv; @@ -535,7 +535,7 @@ static USBDevice *usb_serial_init(const char *filename) if (!cdrv) return NULL; - dev = usb_create(NULL /* FIXME */, "usb-serial"); + dev = usb_create(bus, "usb-serial"); if (!dev) { return NULL; } @@ -549,7 +549,7 @@ static USBDevice *usb_serial_init(const char *filename) return dev; } -static USBDevice *usb_braille_init(const char *unused) +static USBDevice *usb_braille_init(USBBus *bus, const char *unused) { USBDevice *dev; CharDriverState *cdrv; @@ -558,7 +558,7 @@ static USBDevice *usb_braille_init(const char *unused) if (!cdrv) return NULL; - dev = usb_create(NULL /* FIXME */, "usb-braille"); + dev = usb_create(bus, "usb-braille"); qdev_prop_set_chr(&dev->qdev, "chardev", cdrv); qdev_init_nofail(&dev->qdev); |