ChangeSet 1.1673.8.66, 2004/03/31 14:08:01-08:00, [EMAIL PROTECTED]

USB: clean up usb_get_dev() as it was written quite horribly.


 drivers/usb/core/usb.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)


diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c    Wed Apr 14 14:34:29 2004
+++ b/drivers/usb/core/usb.c    Wed Apr 14 14:34:29 2004
@@ -770,16 +770,9 @@
  */
 struct usb_device *usb_get_dev (struct usb_device *dev)
 {
-       struct device *tmp;
-
-       if (!dev)
-               return NULL;
-
-       tmp = get_device(&dev->dev);
-       if (tmp)        
-               return to_usb_device(tmp);
-       else
-               return NULL;
+       if (dev)
+               get_device(&dev->dev);
+       return dev;
 }
 
 /**



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to