diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-23 20:24:48 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:54:55 -0500 |
commit | 2c9ede55ecec58099b72e4bb8eab719f32f72c31 (patch) | |
tree | 8498a8c940fea97931b469fc73eb1a5022a2b28c /drivers/char | |
parent | 7d54fa6472609f2b0f2ea27e51ec2cf1fb27bd57 (diff) |
switch device_get_devnode() and ->devnode() to umode_t *
both callers of device_get_devnode() are only interested in lower 16bits
and nobody tries to return anything wider than 16bit anyway.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/mem.c | 4 | ||||
-rw-r--r-- | drivers/char/misc.c | 2 | ||||
-rw-r--r-- | drivers/char/raw.c | 2 | ||||
-rw-r--r-- | drivers/char/tile-srom.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 145179033716..d6e9d081c8b1 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -847,7 +847,7 @@ static const struct file_operations kmsg_fops = { | |||
847 | 847 | ||
848 | static const struct memdev { | 848 | static const struct memdev { |
849 | const char *name; | 849 | const char *name; |
850 | mode_t mode; | 850 | umode_t mode; |
851 | const struct file_operations *fops; | 851 | const struct file_operations *fops; |
852 | struct backing_dev_info *dev_info; | 852 | struct backing_dev_info *dev_info; |
853 | } devlist[] = { | 853 | } devlist[] = { |
@@ -901,7 +901,7 @@ static const struct file_operations memory_fops = { | |||
901 | .llseek = noop_llseek, | 901 | .llseek = noop_llseek, |
902 | }; | 902 | }; |
903 | 903 | ||
904 | static char *mem_devnode(struct device *dev, mode_t *mode) | 904 | static char *mem_devnode(struct device *dev, umode_t *mode) |
905 | { | 905 | { |
906 | if (mode && devlist[MINOR(dev->devt)].mode) | 906 | if (mode && devlist[MINOR(dev->devt)].mode) |
907 | *mode = devlist[MINOR(dev->devt)].mode; | 907 | *mode = devlist[MINOR(dev->devt)].mode; |
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 778273c93242..522136d40843 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c | |||
@@ -258,7 +258,7 @@ int misc_deregister(struct miscdevice *misc) | |||
258 | EXPORT_SYMBOL(misc_register); | 258 | EXPORT_SYMBOL(misc_register); |
259 | EXPORT_SYMBOL(misc_deregister); | 259 | EXPORT_SYMBOL(misc_deregister); |
260 | 260 | ||
261 | static char *misc_devnode(struct device *dev, mode_t *mode) | 261 | static char *misc_devnode(struct device *dev, umode_t *mode) |
262 | { | 262 | { |
263 | struct miscdevice *c = dev_get_drvdata(dev); | 263 | struct miscdevice *c = dev_get_drvdata(dev); |
264 | 264 | ||
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index b6de2c047145..54a3a6d09819 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -308,7 +308,7 @@ static const struct file_operations raw_ctl_fops = { | |||
308 | 308 | ||
309 | static struct cdev raw_cdev; | 309 | static struct cdev raw_cdev; |
310 | 310 | ||
311 | static char *raw_devnode(struct device *dev, mode_t *mode) | 311 | static char *raw_devnode(struct device *dev, umode_t *mode) |
312 | { | 312 | { |
313 | return kasprintf(GFP_KERNEL, "raw/%s", dev_name(dev)); | 313 | return kasprintf(GFP_KERNEL, "raw/%s", dev_name(dev)); |
314 | } | 314 | } |
diff --git a/drivers/char/tile-srom.c b/drivers/char/tile-srom.c index cf3ee008dca2..4dc019408fac 100644 --- a/drivers/char/tile-srom.c +++ b/drivers/char/tile-srom.c | |||
@@ -329,7 +329,7 @@ static struct device_attribute srom_dev_attrs[] = { | |||
329 | __ATTR_NULL | 329 | __ATTR_NULL |
330 | }; | 330 | }; |
331 | 331 | ||
332 | static char *srom_devnode(struct device *dev, mode_t *mode) | 332 | static char *srom_devnode(struct device *dev, umode_t *mode) |
333 | { | 333 | { |
334 | *mode = S_IRUGO | S_IWUSR; | 334 | *mode = S_IRUGO | S_IWUSR; |
335 | return kasprintf(GFP_KERNEL, "srom/%s", dev_name(dev)); | 335 | return kasprintf(GFP_KERNEL, "srom/%s", dev_name(dev)); |