aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/devio.c20
-rw-r--r--include/linux/usb.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 2eda52fc1ebc..3f8e06279c92 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -515,19 +515,19 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, unsig
515 515
516static struct usb_device *usbdev_lookup_minor(int minor) 516static struct usb_device *usbdev_lookup_minor(int minor)
517{ 517{
518 struct class_device *class_dev; 518 struct device *device;
519 struct usb_device *dev = NULL; 519 struct usb_device *udev = NULL;
520 520
521 down(&usb_device_class->sem); 521 down(&usb_device_class->sem);
522 list_for_each_entry(class_dev, &usb_device_class->children, node) { 522 list_for_each_entry(device, &usb_device_class->devices, node) {
523 if (class_dev->devt == MKDEV(USB_DEVICE_MAJOR, minor)) { 523 if (device->devt == MKDEV(USB_DEVICE_MAJOR, minor)) {
524 dev = class_dev->class_data; 524 udev = device->platform_data;
525 break; 525 break;
526 } 526 }
527 } 527 }
528 up(&usb_device_class->sem); 528 up(&usb_device_class->sem);
529 529
530 return dev; 530 return udev;
531}; 531};
532 532
533/* 533/*
@@ -1580,16 +1580,16 @@ static void usbdev_add(struct usb_device *dev)
1580{ 1580{
1581 int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1); 1581 int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1);
1582 1582
1583 dev->class_dev = class_device_create(usb_device_class, NULL, 1583 dev->usbfs_dev = device_create(usb_device_class, &dev->dev,
1584 MKDEV(USB_DEVICE_MAJOR, minor), &dev->dev, 1584 MKDEV(USB_DEVICE_MAJOR, minor),
1585 "usbdev%d.%d", dev->bus->busnum, dev->devnum); 1585 "usbdev%d.%d", dev->bus->busnum, dev->devnum);
1586 1586
1587 dev->class_dev->class_data = dev; 1587 dev->usbfs_dev->platform_data = dev;
1588} 1588}
1589 1589
1590static void usbdev_remove(struct usb_device *dev) 1590static void usbdev_remove(struct usb_device *dev)
1591{ 1591{
1592 class_device_unregister(dev->class_dev); 1592 device_unregister(dev->usbfs_dev);
1593} 1593}
1594 1594
1595static int usbdev_notify(struct notifier_block *self, unsigned long action, 1595static int usbdev_notify(struct notifier_block *self, unsigned long action,
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 46956a72de5d..b69b6cfb0bd7 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -360,7 +360,7 @@ struct usb_device {
360 char *serial; /* iSerialNumber string, if present */ 360 char *serial; /* iSerialNumber string, if present */
361 361
362 struct list_head filelist; 362 struct list_head filelist;
363 struct class_device *class_dev; 363 struct device *usbfs_dev;
364 struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ 364 struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */
365 365
366 /* 366 /*