diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-20 18:55:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-20 18:55:39 -0400 |
commit | a57c21c7159e07c27e317ea3513dfb382be3f153 (patch) | |
tree | d70427d2d2f44b9d973aa21e7eef93f30f17515d /drivers/usb | |
parent | e11c675ede0d42a405ae595528bf0b29ce1ae56f (diff) | |
parent | e454cea20bdcff10ee698d11b8882662a0153a47 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
Driver-Core: extend devnode callbacks to provide permissions
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/class/usblp.c | 4 | ||||
-rw-r--r-- | drivers/usb/core/file.c | 8 | ||||
-rw-r--r-- | drivers/usb/core/usb.c | 4 | ||||
-rw-r--r-- | drivers/usb/misc/iowarrior.c | 4 | ||||
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 26c09f0257db..9bc112ee7803 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
@@ -1057,14 +1057,14 @@ static const struct file_operations usblp_fops = { | |||
1057 | .release = usblp_release, | 1057 | .release = usblp_release, |
1058 | }; | 1058 | }; |
1059 | 1059 | ||
1060 | static char *usblp_nodename(struct device *dev) | 1060 | static char *usblp_devnode(struct device *dev, mode_t *mode) |
1061 | { | 1061 | { |
1062 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); | 1062 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | static struct usb_class_driver usblp_class = { | 1065 | static struct usb_class_driver usblp_class = { |
1066 | .name = "lp%d", | 1066 | .name = "lp%d", |
1067 | .nodename = usblp_nodename, | 1067 | .devnode = usblp_devnode, |
1068 | .fops = &usblp_fops, | 1068 | .fops = &usblp_fops, |
1069 | .minor_base = USBLP_MINOR_BASE, | 1069 | .minor_base = USBLP_MINOR_BASE, |
1070 | }; | 1070 | }; |
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index 5cef88929b3e..222ee07ea680 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c | |||
@@ -67,14 +67,14 @@ static struct usb_class { | |||
67 | struct class *class; | 67 | struct class *class; |
68 | } *usb_class; | 68 | } *usb_class; |
69 | 69 | ||
70 | static char *usb_nodename(struct device *dev) | 70 | static char *usb_devnode(struct device *dev, mode_t *mode) |
71 | { | 71 | { |
72 | struct usb_class_driver *drv; | 72 | struct usb_class_driver *drv; |
73 | 73 | ||
74 | drv = dev_get_drvdata(dev); | 74 | drv = dev_get_drvdata(dev); |
75 | if (!drv || !drv->nodename) | 75 | if (!drv || !drv->devnode) |
76 | return NULL; | 76 | return NULL; |
77 | return drv->nodename(dev); | 77 | return drv->devnode(dev, mode); |
78 | } | 78 | } |
79 | 79 | ||
80 | static int init_usb_class(void) | 80 | static int init_usb_class(void) |
@@ -100,7 +100,7 @@ static int init_usb_class(void) | |||
100 | kfree(usb_class); | 100 | kfree(usb_class); |
101 | usb_class = NULL; | 101 | usb_class = NULL; |
102 | } | 102 | } |
103 | usb_class->class->nodename = usb_nodename; | 103 | usb_class->class->devnode = usb_devnode; |
104 | 104 | ||
105 | exit: | 105 | exit: |
106 | return result; | 106 | return result; |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index a26f73880c32..43ee943d757a 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -311,7 +311,7 @@ static struct dev_pm_ops usb_device_pm_ops = { | |||
311 | #endif /* CONFIG_PM */ | 311 | #endif /* CONFIG_PM */ |
312 | 312 | ||
313 | 313 | ||
314 | static char *usb_nodename(struct device *dev) | 314 | static char *usb_devnode(struct device *dev, mode_t *mode) |
315 | { | 315 | { |
316 | struct usb_device *usb_dev; | 316 | struct usb_device *usb_dev; |
317 | 317 | ||
@@ -324,7 +324,7 @@ struct device_type usb_device_type = { | |||
324 | .name = "usb_device", | 324 | .name = "usb_device", |
325 | .release = usb_release_dev, | 325 | .release = usb_release_dev, |
326 | .uevent = usb_dev_uevent, | 326 | .uevent = usb_dev_uevent, |
327 | .nodename = usb_nodename, | 327 | .devnode = usb_devnode, |
328 | .pm = &usb_device_pm_ops, | 328 | .pm = &usb_device_pm_ops, |
329 | }; | 329 | }; |
330 | 330 | ||
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index 90e1a8dedfa9..e75bb87ee92b 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c | |||
@@ -727,7 +727,7 @@ static const struct file_operations iowarrior_fops = { | |||
727 | .poll = iowarrior_poll, | 727 | .poll = iowarrior_poll, |
728 | }; | 728 | }; |
729 | 729 | ||
730 | static char *iowarrior_nodename(struct device *dev) | 730 | static char *iowarrior_devnode(struct device *dev, mode_t *mode) |
731 | { | 731 | { |
732 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); | 732 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); |
733 | } | 733 | } |
@@ -738,7 +738,7 @@ static char *iowarrior_nodename(struct device *dev) | |||
738 | */ | 738 | */ |
739 | static struct usb_class_driver iowarrior_class = { | 739 | static struct usb_class_driver iowarrior_class = { |
740 | .name = "iowarrior%d", | 740 | .name = "iowarrior%d", |
741 | .nodename = iowarrior_nodename, | 741 | .devnode = iowarrior_devnode, |
742 | .fops = &iowarrior_fops, | 742 | .fops = &iowarrior_fops, |
743 | .minor_base = IOWARRIOR_MINOR_BASE, | 743 | .minor_base = IOWARRIOR_MINOR_BASE, |
744 | }; | 744 | }; |
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index c1e2433f640d..97efeaec4d52 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c | |||
@@ -266,7 +266,7 @@ 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) | 269 | static char *legousbtower_devnode(struct device *dev, mode_t *mode) |
270 | { | 270 | { |
271 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); | 271 | return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); |
272 | } | 272 | } |
@@ -277,7 +277,7 @@ static char *legousbtower_nodename(struct device *dev) | |||
277 | */ | 277 | */ |
278 | static struct usb_class_driver tower_class = { | 278 | static struct usb_class_driver tower_class = { |
279 | .name = "legousbtower%d", | 279 | .name = "legousbtower%d", |
280 | .nodename = legousbtower_nodename, | 280 | .devnode = legousbtower_devnode, |
281 | .fops = &tower_fops, | 281 | .fops = &tower_fops, |
282 | .minor_base = LEGO_USB_TOWER_MINOR_BASE, | 282 | .minor_base = LEGO_USB_TOWER_MINOR_BASE, |
283 | }; | 283 | }; |