aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/devio.c24
-rw-r--r--include/linux/usb.h2
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 4b3a6ab29bd3..74be846fc029 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -522,19 +522,19 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, unsig
522 522
523static struct usb_device *usbdev_lookup_minor(int minor) 523static struct usb_device *usbdev_lookup_minor(int minor)
524{ 524{
525 struct class_device *class_dev; 525 struct device *device;
526 struct usb_device *dev = NULL; 526 struct usb_device *udev = NULL;
527 527
528 down(&usb_device_class->sem); 528 down(&usb_device_class->sem);
529 list_for_each_entry(class_dev, &usb_device_class->children, node) { 529 list_for_each_entry(device, &usb_device_class->devices, node) {
530 if (class_dev->devt == MKDEV(USB_DEVICE_MAJOR, minor)) { 530 if (device->devt == MKDEV(USB_DEVICE_MAJOR, minor)) {
531 dev = class_dev->class_data; 531 udev = device->platform_data;
532 break; 532 break;
533 } 533 }
534 } 534 }
535 up(&usb_device_class->sem); 535 up(&usb_device_class->sem);
536 536
537 return dev; 537 return udev;
538}; 538};
539 539
540/* 540/*
@@ -1596,19 +1596,19 @@ static int usbdev_add(struct usb_device *dev)
1596{ 1596{
1597 int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1); 1597 int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1);
1598 1598
1599 dev->class_dev = class_device_create(usb_device_class, NULL, 1599 dev->usbfs_dev = device_create(usb_device_class, &dev->dev,
1600 MKDEV(USB_DEVICE_MAJOR, minor), &dev->dev, 1600 MKDEV(USB_DEVICE_MAJOR, minor),
1601 "usbdev%d.%d", dev->bus->busnum, dev->devnum); 1601 "usbdev%d.%d", dev->bus->busnum, dev->devnum);
1602 if (IS_ERR(dev->class_dev)) 1602 if (IS_ERR(dev->usbfs_dev))
1603 return PTR_ERR(dev->class_dev); 1603 return PTR_ERR(dev->usbfs_dev);
1604 1604
1605 dev->class_dev->class_data = dev; 1605 dev->usbfs_dev->platform_data = dev;
1606 return 0; 1606 return 0;
1607} 1607}
1608 1608
1609static void usbdev_remove(struct usb_device *dev) 1609static void usbdev_remove(struct usb_device *dev)
1610{ 1610{
1611 class_device_unregister(dev->class_dev); 1611 device_unregister(dev->usbfs_dev);
1612} 1612}
1613 1613
1614static int usbdev_notify(struct notifier_block *self, unsigned long action, 1614static int usbdev_notify(struct notifier_block *self, unsigned long action,
diff --git a/include/linux/usb.h b/include/linux/usb.h
index aab5b1b72021..f18ced001924 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -372,7 +372,7 @@ struct usb_device {
372 char *serial; /* iSerialNumber string, if present */ 372 char *serial; /* iSerialNumber string, if present */
373 373
374 struct list_head filelist; 374 struct list_head filelist;
375 struct class_device *class_dev; 375 struct device *usbfs_dev;
376 struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ 376 struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */
377 377
378 /* 378 /*