ChangeSet 1.924.3.10, 2002/11/30 22:20:27-08:00, greg@kroah.com [PATCH] USB: get previous module patch to even build properly... diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c --- a/drivers/usb/core/devio.c Sun Dec 1 23:05:51 2002 +++ b/drivers/usb/core/devio.c Sun Dec 1 23:05:51 2002 @@ -1129,7 +1129,7 @@ } unlock_kernel (); retval = driver->ioctl (ifp, ctrl.ioctl_code, buf); - put_module (driver->owner); + module_put (driver->owner); } if (retval == -ENOIOCTLCMD) diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c Sun Dec 1 23:05:51 2002 +++ b/drivers/usb/core/usb.c Sun Dec 1 23:05:51 2002 @@ -77,15 +77,16 @@ struct usb_driver * driver = to_usb_driver(dev->driver); const struct usb_device_id *id; int error = -ENODEV; - int m; dbg("%s", __FUNCTION__); if (!driver->probe) return error; - if (!try_module_get(driver->owner)) + if (!try_module_get(driver->owner)) { + err ("Can't get a module reference for %s", driver->name); return error; + } id = usb_match_id (intf, driver->id_table); if (id) { @@ -97,7 +98,7 @@ if (!error) intf->driver = driver; - put_module(driver->owner); + module_put(driver->owner); return error; } @@ -106,7 +107,6 @@ { struct usb_interface *intf; struct usb_driver *driver; - int m; intf = list_entry(dev,struct usb_interface,dev); driver = to_usb_driver(dev->driver); @@ -117,8 +117,7 @@ return -ENODEV; } - m = try_module_get(driver->owner); - if (m == 0) { + if (!try_module_get(driver->owner)) { // FIXME this happens even when we just rmmod // drivers that aren't in active use... err("Dieing driver still bound to device.\n"); @@ -138,7 +137,7 @@ usb_driver_release_interface(driver, intf); up(&driver->serialize); - module_put(driver->owner) + module_put(driver->owner); return 0; }