aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
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/gadget
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/gadget')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 7d1c22c34957..fdab97a27c08 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -889,11 +889,9 @@ EXPORT_SYMBOL (net2280_set_fifo_mode);
889static void 889static void
890dummy_gadget_release (struct device *dev) 890dummy_gadget_release (struct device *dev)
891{ 891{
892#if 0 /* usb_bus_put isn't EXPORTed! */
893 struct dummy *dum = gadget_dev_to_dummy (dev); 892 struct dummy *dum = gadget_dev_to_dummy (dev);
894 893
895 usb_bus_put (&dummy_to_hcd (dum)->self); 894 usb_put_hcd (dummy_to_hcd (dum));
896#endif
897} 895}
898 896
899static int dummy_udc_probe (struct platform_device *pdev) 897static int dummy_udc_probe (struct platform_device *pdev)
@@ -915,9 +913,7 @@ static int dummy_udc_probe (struct platform_device *pdev)
915 if (rc < 0) 913 if (rc < 0)
916 return rc; 914 return rc;
917 915
918#if 0 /* usb_bus_get isn't EXPORTed! */ 916 usb_get_hcd (dummy_to_hcd (dum));
919 usb_bus_get (&dummy_to_hcd (dum)->self);
920#endif
921 917
922 platform_set_drvdata (pdev, dum); 918 platform_set_drvdata (pdev, dum);
923 device_create_file (&dum->gadget.dev, &dev_attr_function); 919 device_create_file (&dum->gadget.dev, &dev_attr_function);