[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/14] usb-host: remove usb_host_device_close
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 07/14] usb-host: remove usb_host_device_close |
Date: |
Thu, 21 Feb 2013 10:59:06 +0100 |
Nobody implements that anyway.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb.h | 1 -
hw/usb/host-bsd.c | 6 ------
hw/usb/host-linux.c | 24 ------------------------
hw/usb/host-stub.c | 5 -----
vl.c | 5 +++--
5 files changed, 3 insertions(+), 38 deletions(-)
diff --git a/hw/usb.h b/hw/usb.h
index bc42639..90024a4 100644
--- 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 */
diff --git a/hw/usb/host-bsd.c b/hw/usb/host-bsd.c
index 07f0e01..39f2281 100644
--- a/hw/usb/host-bsd.c
+++ b/hw/usb/host-bsd.c
@@ -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;
-}
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index c18a6c8..b67aeba 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -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
*
diff --git a/hw/usb/host-stub.c b/hw/usb/host-stub.c
index 8affba7..28d8032 100644
--- a/hw/usb/host-stub.c
+++ b/hw/usb/host-stub.c
@@ -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 c5b0eea..955d2ff 100644
--- 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;
--
1.7.9.7
- [Qemu-devel] [PULL 00/14] usb patch queue, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 03/14] make usb devices configurable, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 02/14] fix scripts/make_device_config.sh, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 10/14] usb-redir: simplify packet copy, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 07/14] usb-host: remove usb_host_device_close,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 08/14] usb: add usb_ep_set_halted, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 05/14] usb-storage: use scsi_req_enqueue return value, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 11/14] usb: fix endpoint descriptor ordering, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 09/14] usb: make usb_packet_copy operate on combined packets, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 04/14] allow disabling usb smartcard support, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 01/14] usb: Makefile cleanup, Gerd Hoffmann, 2013/02/21
- [Qemu-devel] [PATCH 12/14] usb-core: usb3 streams, Gerd Hoffmann, 2013/02/21
- Re: [Qemu-devel] [PATCH 12/14] usb-core: usb3 streams, Eduardo Habkost, 2013/02/21