aboutsummaryrefslogtreecommitdiff
path: root/usb-bsd.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-09-07 19:00:18 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-09-07 19:00:18 +0000
commit179da8afe61753453bc70a93ba0f0f4081e06f4d (patch)
treee75dc074086c30322a2f7b43307b1eb3b11172f3 /usb-bsd.c
parent1e43a8e4d263809aa4e606a8a16667fbfd0d754f (diff)
USB: use opaque parameter passing for monitor handle
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'usb-bsd.c')
-rw-r--r--usb-bsd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usb-bsd.c b/usb-bsd.c
index 5becea5613..693f2ca855 100644
--- a/usb-bsd.c
+++ b/usb-bsd.c
@@ -552,13 +552,12 @@ static const char *usb_class_str(uint8_t class)
return p->class_name;
}
-static void usb_info_device(int bus_num, int addr, int class_id,
+static void usb_info_device(Monitor *mon, int bus_num, int addr, int class_id,
int vendor_id, int product_id,
const char *product_name,
int speed)
{
const char *class_str, *speed_str;
- Monitor *mon = cur_mon;
switch(speed) {
case USB_SPEED_LOW:
@@ -595,14 +594,16 @@ static int usb_host_info_device(void *opaque,
const char *product_name,
int speed)
{
- usb_info_device(bus_num, addr, class_id, vendor_id, product_id,
+ Monitor *mon = opaque;
+
+ usb_info_device(mon, bus_num, addr, class_id, vendor_id, product_id,
product_name, speed);
return 0;
}
void usb_host_info(Monitor *mon)
{
- usb_host_scan(NULL, usb_host_info_device);
+ usb_host_scan(mon, usb_host_info_device);
}
/* XXX add this */