Commit 28bd3683 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[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.
parent 9508eb64
......@@ -47,6 +47,7 @@
#include <asm/byteorder.h>
#include "hcd.h" /* for usbcore internals */
#include "usb.h"
struct async {
struct list_head asynclist;
......@@ -726,7 +727,7 @@ static int proc_resetdevice(struct dev_state *ps)
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 @@ static int proc_ioctl (struct dev_state *ps, void __user *arg)
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 @@ static int proc_ioctl (struct dev_state *ps, void __user *arg)
/* 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;
......
......@@ -98,7 +98,7 @@ static void nuke_urbs(struct usb_device *dev)
}
/* 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 @@ int usb_device_probe(struct device *dev)
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 @@ int usb_register(struct usb_driver *new_driver)
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);
......@@ -1586,9 +1586,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);
EXPORT_SYMBOL(usb_get_dev);
......
......@@ -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);
......@@ -487,8 +487,6 @@ extern int usb_register_dev(struct usb_interface *intf,
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);
/* -------------------------------------------------------------------------- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment