diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-04-30 09:23:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:30:25 -0400 |
commit | f7a386c5b8ff34cd84ae922603d1c6f9d234edee (patch) | |
tree | ae1c03544dd511d85cc537c632eba6f035072e36 /drivers/media/video/dabusb.c | |
parent | d405640539555b601e52f7d18f1f0b1345d18bf5 (diff) |
Driver Core: usb: add nodename support for usb drivers.
This adds support for USB drivers to report their requested nodename to
userspace. It also updates a number of USB drivers to provide the
needed subdirectory and device name to be used for them.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/media/video/dabusb.c')
-rw-r--r-- | drivers/media/video/dabusb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c index ba3709bec3f0..ec2f45dde164 100644 --- a/drivers/media/video/dabusb.c +++ b/drivers/media/video/dabusb.c | |||
@@ -747,8 +747,14 @@ static const struct file_operations dabusb_fops = | |||
747 | .release = dabusb_release, | 747 | .release = dabusb_release, |
748 | }; | 748 | }; |
749 | 749 | ||
750 | static char *dabusb_nodename(struct device *dev) | ||
751 | { | ||
752 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); | ||
753 | } | ||
754 | |||
750 | static struct usb_class_driver dabusb_class = { | 755 | static struct usb_class_driver dabusb_class = { |
751 | .name = "dabusb%d", | 756 | .name = "dabusb%d", |
757 | .nodename = dabusb_nodename, | ||
752 | .fops = &dabusb_fops, | 758 | .fops = &dabusb_fops, |
753 | .minor_base = DABUSB_MINOR, | 759 | .minor_base = DABUSB_MINOR, |
754 | }; | 760 | }; |