[PATCH] USB: remove the global function usbdev_lookup_minor
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Jun 2005 04:15:16 +0000 (21:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 23:47:45 +0000 (16:47 -0700)
It's only used locally.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c
drivers/usb/core/usb.h

index 6c15dabcfc0b0346576e0bd4d6b1e7aa948e1ed6..9222b7a13430c4fc8ed0b499b15b62f26baf0a08 100644 (file)
@@ -517,6 +517,23 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, unsig
        return ret;
 }
 
+static struct usb_device *usbdev_lookup_minor(int minor)
+{
+       struct class_device *class_dev;
+       struct usb_device *dev = NULL;
+
+       down(&usb_device_class->sem);
+       list_for_each_entry(class_dev, &usb_device_class->children, node) {
+               if (class_dev->devt == MKDEV(USB_DEVICE_MAJOR, minor)) {
+                       dev = class_dev->class_data;
+                       break;
+               }
+       }
+       up(&usb_device_class->sem);
+
+       return dev;
+};
+
 /*
  * file operations
  */
@@ -1533,23 +1550,6 @@ struct file_operations usbfs_device_file_operations = {
        .release =      usbdev_release,
 };
 
-struct usb_device *usbdev_lookup_minor(int minor)
-{
-       struct class_device *class_dev;
-       struct usb_device *dev = NULL;
-
-       down(&usb_device_class->sem);
-       list_for_each_entry(class_dev, &usb_device_class->children, node) {
-               if (class_dev->devt == MKDEV(USB_DEVICE_MAJOR, minor)) {
-                       dev = class_dev->class_data;
-                       break;
-               }
-       }
-       up(&usb_device_class->sem);
-
-       return dev;
-};
-
 void usbdev_add(struct usb_device *dev)
 {
        int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1);
index 4d59f6e079996fb3e6f4c9eeb70a1202a7074fef..3dc8096c0f92d0f85c2ed245b88daecc8342329a 100644 (file)
@@ -64,7 +64,6 @@ extern int usbdev_init(void);
 extern void usbdev_cleanup(void);
 extern void usbdev_add(struct usb_device *dev);
 extern void usbdev_remove(struct usb_device *dev);
-extern struct usb_device *usbdev_lookup_minor(int minor);
 
 struct dev_state {
        struct list_head list;      /* state list */