]> Git Repo - qemu.git/commitdiff
usb-host: remove usb_host_device_close
authorGerd Hoffmann <[email protected]>
Fri, 30 Nov 2012 12:02:47 +0000 (13:02 +0100)
committerGerd Hoffmann <[email protected]>
Tue, 19 Feb 2013 11:30:05 +0000 (12:30 +0100)
Nobody implements that anyway.

Signed-off-by: Gerd Hoffmann <[email protected]>
hw/usb.h
hw/usb/host-bsd.c
hw/usb/host-linux.c
hw/usb/host-stub.c
vl.c

index bc42639b167aed356c37eaa4f069f416ea5b61c1..90024a45159675a35fab7a82b9d563715b8d4995 100644 (file)
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -434,7 +434,6 @@ int set_usb_string(uint8_t *buf, const char *str);
 
 /* usb-linux.c */
 USBDevice *usb_host_device_open(USBBus *bus, const char *devname);
-int usb_host_device_close(const char *devname);
 void usb_host_info(Monitor *mon, const QDict *qdict);
 
 /* usb-bt.c */
index 07f0e01cc004296295a8beda816437d5207cbaf7..39f22810b394db0909f99b932509ef82eb4ddb41 100644 (file)
@@ -637,9 +637,3 @@ void usb_host_info(Monitor *mon, const QDict *qdict)
 {
     usb_host_scan(mon, usb_host_info_device);
 }
-
-/* XXX add this */
-int usb_host_device_close(const char *devname)
-{
-    return 0;
-}
index c18a6c80467149fc2c25cf0489e2fee5a8ac8241..b67aeba0964a6756fbe0754e551bbd54f9a315b1 100644 (file)
@@ -1540,30 +1540,6 @@ static void usb_host_register_types(void)
 
 type_init(usb_host_register_types)
 
-int usb_host_device_close(const char *devname)
-{
-#if 0
-    char product_name[PRODUCT_NAME_SZ];
-    int bus_num, addr;
-    USBHostDevice *s;
-
-    if (strstr(devname, "auto:")) {
-        return usb_host_auto_del(devname);
-    }
-    if (usb_host_find_device(&bus_num, &addr, product_name,
-                                    sizeof(product_name), devname) < 0) {
-        return -1;
-    }
-    s = hostdev_find(bus_num, addr);
-    if (s) {
-        usb_device_delete_addr(s->bus_num, s->dev.addr);
-        return 0;
-    }
-#endif
-
-    return -1;
-}
-
 /*
  * Read sys file-system device file
  *
index 8affba76c1f18eb80f5e4b2e2e76d002bae1dc81..28d8032caf7e968a440a179ce6edcd81782181f3 100644 (file)
@@ -45,8 +45,3 @@ USBDevice *usb_host_device_open(USBBus *bus, const char *devname)
 {
     return NULL;
 }
-
-int usb_host_device_close(const char *devname)
-{
-    return 0;
-}
diff --git a/vl.c b/vl.c
index c5b0eea29b6a37bb95f0ebdd8197acb51bec2bac..955d2ffe0fc25a18fdd83892300c1be5e1e7da98 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1427,8 +1427,9 @@ static int usb_device_del(const char *devname)
     int bus_num, addr;
     const char *p;
 
-    if (strstart(devname, "host:", &p))
-        return usb_host_device_close(p);
+    if (strstart(devname, "host:", &p)) {
+        return -1;
+    }
 
     if (!usb_enabled(false)) {
         return -1;
This page took 0.032279 seconds and 4 git commands to generate.