diff options
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/iowarrior.c | 6 | ||||
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index a4ef77ef917d..3c5fe5cee05a 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c | |||
@@ -726,12 +726,18 @@ static const struct file_operations iowarrior_fops = { | |||
726 | .poll = iowarrior_poll, | 726 | .poll = iowarrior_poll, |
727 | }; | 727 | }; |
728 | 728 | ||
729 | static char *iowarrior_nodename(struct device *dev) | ||
730 | { | ||
731 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); | ||
732 | } | ||
733 | |||
729 | /* | 734 | /* |
730 | * usb class driver info in order to get a minor number from the usb core, | 735 | * usb class driver info in order to get a minor number from the usb core, |
731 | * and to have the device registered with devfs and the driver core | 736 | * and to have the device registered with devfs and the driver core |
732 | */ | 737 | */ |
733 | static struct usb_class_driver iowarrior_class = { | 738 | static struct usb_class_driver iowarrior_class = { |
734 | .name = "iowarrior%d", | 739 | .name = "iowarrior%d", |
740 | .nodename = iowarrior_nodename, | ||
735 | .fops = &iowarrior_fops, | 741 | .fops = &iowarrior_fops, |
736 | .minor_base = IOWARRIOR_MINOR_BASE, | 742 | .minor_base = IOWARRIOR_MINOR_BASE, |
737 | }; | 743 | }; |
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index ab0f3226158b..c1e2433f640d 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c | |||
@@ -266,12 +266,18 @@ static const struct file_operations tower_fops = { | |||
266 | .llseek = tower_llseek, | 266 | .llseek = tower_llseek, |
267 | }; | 267 | }; |
268 | 268 | ||
269 | static char *legousbtower_nodename(struct device *dev) | ||
270 | { | ||
271 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); | ||
272 | } | ||
273 | |||
269 | /* | 274 | /* |
270 | * usb class driver info in order to get a minor number from the usb core, | 275 | * usb class driver info in order to get a minor number from the usb core, |
271 | * and to have the device registered with the driver core | 276 | * and to have the device registered with the driver core |
272 | */ | 277 | */ |
273 | static struct usb_class_driver tower_class = { | 278 | static struct usb_class_driver tower_class = { |
274 | .name = "legousbtower%d", | 279 | .name = "legousbtower%d", |
280 | .nodename = legousbtower_nodename, | ||
275 | .fops = &tower_fops, | 281 | .fops = &tower_fops, |
276 | .minor_base = LEGO_USB_TOWER_MINOR_BASE, | 282 | .minor_base = LEGO_USB_TOWER_MINOR_BASE, |
277 | }; | 283 | }; |