aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/mon
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-08-30 11:32:52 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:56 -0400
commit1720058343fa43a1a25bfad9e62ea06e7e9743b6 (patch)
tree8225039836451d9784f729cf5136d5ad0443658c /drivers/usb/mon
parentdd990f16a39d4e615c0b70a0ab50b79b32bfb16d (diff)
usbcore: trim down usb_bus structure
As part of the ongoing program to flatten out the HCD bus-glue layer, this patch (as771b) eliminates the hcpriv, release, and kref fields from struct usb_bus. hcpriv and release were not being used for anything worthwhile, and kref has been moved into the enclosing usb_hcd structure. Along with those changes, the patch gets rid of usb_bus_get and usb_bus_put, replacing them with usb_get_hcd and usb_put_hcd. The one interesting aspect is that the dev_set_drvdata call was removed from usb_put_hcd, where it clearly doesn't belong. This means the driver private data won't get reset to NULL. It shouldn't cause any problems, since the private data is undefined when no driver is bound. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/mon')
-rw-r--r--drivers/usb/mon/mon_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c
index 275a66f83058..e0ed36cdfd8b 100644
--- a/drivers/usb/mon/mon_main.c
+++ b/drivers/usb/mon/mon_main.c
@@ -265,7 +265,6 @@ static void mon_dissolve(struct mon_bus *mbus, struct usb_bus *ubus)
265 ubus->mon_bus = NULL; 265 ubus->mon_bus = NULL;
266 mbus->u_bus = NULL; 266 mbus->u_bus = NULL;
267 mb(); 267 mb();
268 // usb_bus_put(ubus);
269} 268}
270 269
271/* 270/*
@@ -297,10 +296,9 @@ static void mon_bus_init(struct dentry *mondir, struct usb_bus *ubus)
297 INIT_LIST_HEAD(&mbus->r_list); 296 INIT_LIST_HEAD(&mbus->r_list);
298 297
299 /* 298 /*
300 * This usb_bus_get here is superfluous, because we receive 299 * We don't need to take a reference to ubus, because we receive
301 * a notification if usb_bus is about to be removed. 300 * a notification if the bus is about to be removed.
302 */ 301 */
303 // usb_bus_get(ubus);
304 mbus->u_bus = ubus; 302 mbus->u_bus = ubus;
305 ubus->mon_bus = mbus; 303 ubus->mon_bus = mbus;
306 304