ChangeSet 1.1595.7.29, 2003/07/31 22:49:25-07:00, stern@rowland.harvard.edu [PATCH] USB: Rename probe and unbind functions The is the first part of what used to be as66c. It simply renames usb_device_probe() and usb_device_remove() to usb_probe_interface() and usb_unbind_interface(). And since they're not needed outside of usbcore, it stops exporting them. drivers/usb/core/devio.c | 7 ++++--- drivers/usb/core/usb.c | 11 ++++------- drivers/usb/core/usb.h | 3 ++- include/linux/usb.h | 2 -- 4 files changed, 10 insertions(+), 13 deletions(-) diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c --- a/drivers/usb/core/devio.c Fri Aug 1 10:54:07 2003 +++ b/drivers/usb/core/devio.c Fri Aug 1 10:54:07 2003 @@ -47,6 +47,7 @@ #include #include "hcd.h" /* for usbcore internals */ +#include "usb.h" struct async { struct list_head asynclist; @@ -726,7 +727,7 @@ err ("%s - this function is broken", __FUNCTION__); if (intf->driver && ps->dev) { - usb_device_probe (&intf->dev); + usb_probe_interface (&intf->dev); } } @@ -1105,7 +1106,7 @@ if (driver) { dbg ("disconnect '%s' from dev %d interface %d", driver->name, ps->dev->devnum, ctrl.ifno); - usb_device_remove(&ifp->dev); + usb_unbind_interface(&ifp->dev); } else retval = -ENODATA; unlock_kernel(); @@ -1114,7 +1115,7 @@ /* let kernel drivers try to (re)bind to the interface */ case USBDEVFS_CONNECT: lock_kernel(); - retval = usb_device_probe (&ifp->dev); + retval = usb_probe_interface (&ifp->dev); unlock_kernel(); break; diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c Fri Aug 1 10:54:07 2003 +++ b/drivers/usb/core/usb.c Fri Aug 1 10:54:07 2003 @@ -98,7 +98,7 @@ } /* needs to be called with BKL held */ -int usb_device_probe(struct device *dev) +int usb_probe_interface(struct device *dev) { struct usb_interface * intf = to_usb_interface(dev); struct usb_driver * driver = to_usb_driver(dev->driver); @@ -123,7 +123,7 @@ return error; } -int usb_device_remove(struct device *dev) +int usb_unbind_interface(struct device *dev) { struct usb_interface *intf; struct usb_driver *driver; @@ -170,8 +170,8 @@ new_driver->driver.name = (char *)new_driver->name; new_driver->driver.bus = &usb_bus_type; - new_driver->driver.probe = usb_device_probe; - new_driver->driver.remove = usb_device_remove; + new_driver->driver.probe = usb_probe_interface; + new_driver->driver.remove = usb_unbind_interface; init_MUTEX(&new_driver->serialize); @@ -1585,9 +1585,6 @@ EXPORT_SYMBOL(usb_register); EXPORT_SYMBOL(usb_deregister); EXPORT_SYMBOL(usb_disabled); - -EXPORT_SYMBOL(usb_device_probe); -EXPORT_SYMBOL(usb_device_remove); EXPORT_SYMBOL(usb_alloc_dev); EXPORT_SYMBOL(usb_put_dev); diff -Nru a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h --- a/drivers/usb/core/usb.h Fri Aug 1 10:54:07 2003 +++ b/drivers/usb/core/usb.h Fri Aug 1 10:54:07 2003 @@ -2,4 +2,5 @@ extern void usb_create_driverfs_dev_files (struct usb_device *dev); extern void usb_create_driverfs_intf_files (struct usb_interface *intf); - +extern int usb_probe_interface (struct device *dev); +extern int usb_unbind_interface (struct device *dev); diff -Nru a/include/linux/usb.h b/include/linux/usb.h --- a/include/linux/usb.h Fri Aug 1 10:54:07 2003 +++ b/include/linux/usb.h Fri Aug 1 10:54:07 2003 @@ -487,8 +487,6 @@ extern void usb_deregister_dev(struct usb_interface *intf, struct usb_class_driver *class_driver); -extern int usb_device_probe(struct device *dev); -extern int usb_device_remove(struct device *dev); extern int usb_disabled(void); /* -------------------------------------------------------------------------- */