diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-17 21:16:55 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-17 21:16:55 -0400 |
commit | 4b337c5f245b6587ba844ac7bb13c313a2912f7b (patch) | |
tree | 999c6a6580b76a083c8efb9dabff709d1c49fcd0 /drivers/usb/misc/legousbtower.c | |
parent | 492b057c426e4aa747484958e18e9da29003985d (diff) | |
parent | 3fe0344faf7fdcb158bd5c1a9aec960a8d70c8e8 (diff) |
Merge commit 'origin/master' into next
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 | }; |