usb-host: remove usb_host_device_close
Nobody implements that anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
4075975d83
commit
1a3973b33d
1
hw/usb.h
1
hw/usb.h
@ -434,7 +434,6 @@ int set_usb_string(uint8_t *buf, const char *str);
|
|||||||
|
|
||||||
/* usb-linux.c */
|
/* usb-linux.c */
|
||||||
USBDevice *usb_host_device_open(USBBus *bus, const char *devname);
|
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);
|
void usb_host_info(Monitor *mon, const QDict *qdict);
|
||||||
|
|
||||||
/* usb-bt.c */
|
/* usb-bt.c */
|
||||||
|
@ -637,9 +637,3 @@ void usb_host_info(Monitor *mon, const QDict *qdict)
|
|||||||
{
|
{
|
||||||
usb_host_scan(mon, usb_host_info_device);
|
usb_host_scan(mon, usb_host_info_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX add this */
|
|
||||||
int usb_host_device_close(const char *devname)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
@ -1540,30 +1540,6 @@ static void usb_host_register_types(void)
|
|||||||
|
|
||||||
type_init(usb_host_register_types)
|
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
|
* Read sys file-system device file
|
||||||
*
|
*
|
||||||
|
@ -45,8 +45,3 @@ USBDevice *usb_host_device_open(USBBus *bus, const char *devname)
|
|||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int usb_host_device_close(const char *devname)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
5
vl.c
5
vl.c
@ -1427,8 +1427,9 @@ static int usb_device_del(const char *devname)
|
|||||||
int bus_num, addr;
|
int bus_num, addr;
|
||||||
const char *p;
|
const char *p;
|
||||||
|
|
||||||
if (strstart(devname, "host:", &p))
|
if (strstart(devname, "host:", &p)) {
|
||||||
return usb_host_device_close(p);
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!usb_enabled(false)) {
|
if (!usb_enabled(false)) {
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user