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>
This commit is contained in:
+2
-2
@@ -847,7 +847,7 @@ static const struct file_operations kmsg_fops = {
|
||||
|
||||
static const struct memdev {
|
||||
const char *name;
|
||||
mode_t mode;
|
||||
umode_t mode;
|
||||
const struct file_operations *fops;
|
||||
struct backing_dev_info *dev_info;
|
||||
} devlist[] = {
|
||||
@@ -901,7 +901,7 @@ static const struct file_operations memory_fops = {
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
static char *mem_devnode(struct device *dev, mode_t *mode)
|
||||
static char *mem_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
if (mode && devlist[MINOR(dev->devt)].mode)
|
||||
*mode = devlist[MINOR(dev->devt)].mode;
|
||||
|
||||
+1
-1
@@ -258,7 +258,7 @@ int misc_deregister(struct miscdevice *misc)
|
||||
EXPORT_SYMBOL(misc_register);
|
||||
EXPORT_SYMBOL(misc_deregister);
|
||||
|
||||
static char *misc_devnode(struct device *dev, mode_t *mode)
|
||||
static char *misc_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
struct miscdevice *c = dev_get_drvdata(dev);
|
||||
|
||||
|
||||
+1
-1
@@ -308,7 +308,7 @@ static const struct file_operations raw_ctl_fops = {
|
||||
|
||||
static struct cdev raw_cdev;
|
||||
|
||||
static char *raw_devnode(struct device *dev, mode_t *mode)
|
||||
static char *raw_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
return kasprintf(GFP_KERNEL, "raw/%s", dev_name(dev));
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ static struct device_attribute srom_dev_attrs[] = {
|
||||
__ATTR_NULL
|
||||
};
|
||||
|
||||
static char *srom_devnode(struct device *dev, mode_t *mode)
|
||||
static char *srom_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
*mode = S_IRUGO | S_IWUSR;
|
||||
return kasprintf(GFP_KERNEL, "srom/%s", dev_name(dev));
|
||||
|
||||
Reference in New Issue
Block a user