diff options
Diffstat (limited to 'drivers/usb/misc/legousbtower.c')
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 | }; |