summaryrefslogtreecommitdiff
path: root/drivers/usb/core/devio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 21:15:16 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 16:47:45 -0700
commit4592bf5a22593704bb9e8c584a81bf6ca4f6cfec (patch)
treeae30096f376f6922367fd427bcd6594bd866796a /drivers/usb/core/devio.c
parent3e8a556a02d5aa16375d4d74aad0f67cd844c047 (diff)
downloadlwn-4592bf5a22593704bb9e8c584a81bf6ca4f6cfec.tar.gz
lwn-4592bf5a22593704bb9e8c584a81bf6ca4f6cfec.zip
[PATCH] USB: remove the global function usbdev_lookup_minor
It's only used locally. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r--drivers/usb/core/devio.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 6c15dabcfc0b..9222b7a13430 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -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);