diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:13:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:13:47 -0400 |
commit | 53baaaa9682c230410a057263d1ce2922f43ddc4 (patch) | |
tree | f5cced5622130f780d76953b284a631c3d226488 /drivers/usb | |
parent | f10140fbe5f97ecfeda986a12d0f1bad75642779 (diff) | |
parent | 3f9787046ea37a26170dc4439efa21f8d23a9978 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits)
arm: bus_id -> dev_name() and dev_set_name() conversions
sparc64: fix up bus_id changes in sparc core code
3c59x: handle pci_name() being const
MTD: handle pci_name() being const
HP iLO driver
sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute
sysdev: Add utility functions for simple int/ulong variable sysdev attributes
sysdev: Pass the attribute to the low level sysdev show/store function
driver core: Suppress sysfs warnings for device_rename().
kobject: Transmit return value of call_usermodehelper() to caller
sysfs-rules.txt: reword API stability statement
debugfs: Implement debugfs_remove_recursive()
HOWTO: change email addresses of James in HOWTO
always enable FW_LOADER unless EMBEDDED=y
uio-howto.tmpl: use unique output names
uio-howto.tmpl: use standard copyright/legal markings
sysfs: don't call notify_change
sysdev: fix debugging statements in registration code.
kobject: should use kobject_put() in kset-example
kobject: reorder kobject to save space on 64 bit builds
...
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/devio.c | 11 | ||||
-rw-r--r-- | drivers/usb/core/file.c | 5 | ||||
-rw-r--r-- | drivers/usb/gadget/printer.c | 4 | ||||
-rw-r--r-- | drivers/usb/mon/mon_bin.c | 5 |
4 files changed, 16 insertions, 9 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 54a350ccd033..20290c5b1562 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -1729,9 +1729,9 @@ static int usb_classdev_add(struct usb_device *dev) | |||
1729 | { | 1729 | { |
1730 | struct device *cldev; | 1730 | struct device *cldev; |
1731 | 1731 | ||
1732 | cldev = device_create(usb_classdev_class, &dev->dev, dev->dev.devt, | 1732 | cldev = device_create_drvdata(usb_classdev_class, &dev->dev, |
1733 | "usbdev%d.%d", dev->bus->busnum, | 1733 | dev->dev.devt, NULL, "usbdev%d.%d", |
1734 | dev->devnum); | 1734 | dev->bus->busnum, dev->devnum); |
1735 | if (IS_ERR(cldev)) | 1735 | if (IS_ERR(cldev)) |
1736 | return PTR_ERR(cldev); | 1736 | return PTR_ERR(cldev); |
1737 | dev->usb_classdev = cldev; | 1737 | dev->usb_classdev = cldev; |
@@ -1792,6 +1792,11 @@ int __init usb_devio_init(void) | |||
1792 | usb_classdev_class = NULL; | 1792 | usb_classdev_class = NULL; |
1793 | goto out; | 1793 | goto out; |
1794 | } | 1794 | } |
1795 | /* devices of this class shadow the major:minor of their parent | ||
1796 | * device, so clear ->dev_kobj to prevent adding duplicate entries | ||
1797 | * to /sys/dev | ||
1798 | */ | ||
1799 | usb_classdev_class->dev_kobj = NULL; | ||
1795 | 1800 | ||
1796 | usb_register_notify(&usbdev_nb); | 1801 | usb_register_notify(&usbdev_nb); |
1797 | #endif | 1802 | #endif |
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index 913fb8667899..6b1b229e38cd 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c | |||
@@ -196,8 +196,9 @@ int usb_register_dev(struct usb_interface *intf, | |||
196 | ++temp; | 196 | ++temp; |
197 | else | 197 | else |
198 | temp = name; | 198 | temp = name; |
199 | intf->usb_dev = device_create(usb_class->class, &intf->dev, | 199 | intf->usb_dev = device_create_drvdata(usb_class->class, &intf->dev, |
200 | MKDEV(USB_MAJOR, minor), "%s", temp); | 200 | MKDEV(USB_MAJOR, minor), NULL, |
201 | "%s", temp); | ||
201 | if (IS_ERR(intf->usb_dev)) { | 202 | if (IS_ERR(intf->usb_dev)) { |
202 | down_write(&minor_rwsem); | 203 | down_write(&minor_rwsem); |
203 | usb_minors[intf->minor] = NULL; | 204 | usb_minors[intf->minor] = NULL; |
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 9caaec3ae9a3..49cd9e145a9b 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -1360,8 +1360,8 @@ printer_bind(struct usb_gadget *gadget) | |||
1360 | 1360 | ||
1361 | 1361 | ||
1362 | /* Setup the sysfs files for the printer gadget. */ | 1362 | /* Setup the sysfs files for the printer gadget. */ |
1363 | dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno, | 1363 | dev->pdev = device_create_drvdata(usb_gadget_class, NULL, |
1364 | "g_printer"); | 1364 | g_printer_devno, NULL, "g_printer"); |
1365 | if (IS_ERR(dev->pdev)) { | 1365 | if (IS_ERR(dev->pdev)) { |
1366 | ERROR(dev, "Failed to create device: g_printer\n"); | 1366 | ERROR(dev, "Failed to create device: g_printer\n"); |
1367 | goto fail; | 1367 | goto fail; |
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 293a46247c3b..6566fc0a3228 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c | |||
@@ -1162,8 +1162,9 @@ int mon_bin_add(struct mon_bus *mbus, const struct usb_bus *ubus) | |||
1162 | if (minor >= MON_BIN_MAX_MINOR) | 1162 | if (minor >= MON_BIN_MAX_MINOR) |
1163 | return 0; | 1163 | return 0; |
1164 | 1164 | ||
1165 | dev = device_create(mon_bin_class, ubus? ubus->controller: NULL, | 1165 | dev = device_create_drvdata(mon_bin_class, ubus? ubus->controller: NULL, |
1166 | MKDEV(MAJOR(mon_bin_dev0), minor), "usbmon%d", minor); | 1166 | MKDEV(MAJOR(mon_bin_dev0), minor), NULL, |
1167 | "usbmon%d", minor); | ||
1167 | if (IS_ERR(dev)) | 1168 | if (IS_ERR(dev)) |
1168 | return 0; | 1169 | return 0; |
1169 | 1170 | ||