[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] usb: Use usb_bus_find(-1) instead of usb_enabled()
From: |
Lin Ma |
Subject: |
[Qemu-devel] [PATCH] usb: Use usb_bus_find(-1) instead of usb_enabled() in usb_device_add/usb_device_del |
Date: |
Thu, 4 Jun 2015 15:55:34 +0800 |
Without usb=on machine option, usb_device_add/usb_device_del don't work,
Even if there are virtual usb controllers presented.
This patch fixes it.
Signed-off-by: Lin Ma <address@hidden>
---
vl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index 1d4c089..26fab83 100644
--- a/vl.c
+++ b/vl.c
@@ -1234,7 +1234,7 @@ static int usb_device_add(const char *devname)
const char *p;
#endif
- if (!usb_enabled()) {
+ if (!usb_bus_find(-1)) {
return -1;
}
@@ -1266,7 +1266,7 @@ static int usb_device_del(const char *devname)
return -1;
}
- if (!usb_enabled()) {
+ if (!usb_bus_find(-1)) {
return -1;
}
--
2.1.4
- [Qemu-devel] [PATCH] usb: Use usb_bus_find(-1) instead of usb_enabled() in usb_device_add/usb_device_del,
Lin Ma <=