aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/iowarrior.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/iowarrior.c')
-rw-r--r--drivers/usb/misc/iowarrior.c6
1 files changed, 6 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
729static 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 */
733static struct usb_class_driver iowarrior_class = { 738static 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};