From 2c9ede55ecec58099b72e4bb8eab719f32f72c31 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 23 Jul 2011 20:24:48 -0400 Subject: 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 --- drivers/base/core.c | 4 ++-- drivers/base/devtmpfs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/base') diff --git a/drivers/base/core.c b/drivers/base/core.c index 919daa7cd5b1..1dfa1d616fa5 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -198,7 +198,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, if (MAJOR(dev->devt)) { const char *tmp; const char *name; - mode_t mode = 0; + umode_t mode = 0; add_uevent_var(env, "MAJOR=%u", MAJOR(dev->devt)); add_uevent_var(env, "MINOR=%u", MINOR(dev->devt)); @@ -1182,7 +1182,7 @@ static struct device *next_device(struct klist_iter *i) * freed by the caller. */ const char *device_get_devnode(struct device *dev, - mode_t *mode, const char **tmp) + umode_t *mode, const char **tmp) { char *s; diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index a4760e095ff5..3990f682e690 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -40,7 +40,7 @@ static struct req { struct completion done; int err; const char *name; - mode_t mode; /* 0 => delete */ + umode_t mode; /* 0 => delete */ struct device *dev; } *requests; -- cgit v1.2.3-59-g8ed1b From fbd48a69a0b576dd8cba01b2b4fc24fad76f1b68 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 24 Jul 2011 10:47:56 -0400 Subject: switch devtmpfs to umode_t Signed-off-by: Al Viro --- drivers/base/devtmpfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/base') diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index 3990f682e690..393f450cf43c 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -142,7 +142,7 @@ int devtmpfs_delete_node(struct device *dev) return req.err; } -static int dev_mkdir(const char *name, mode_t mode) +static int dev_mkdir(const char *name, umode_t mode) { struct dentry *dentry; struct path path; @@ -189,7 +189,7 @@ static int create_path(const char *nodepath) return err; } -static int handle_create(const char *nodename, mode_t mode, struct device *dev) +static int handle_create(const char *nodename, umode_t mode, struct device *dev) { struct dentry *dentry; struct path path; @@ -378,7 +378,7 @@ int devtmpfs_mount(const char *mntdir) static DECLARE_COMPLETION(setup_done); -static int handle(const char *name, mode_t mode, struct device *dev) +static int handle(const char *name, umode_t mode, struct device *dev) { if (mode) return handle_create(name, mode, dev); -- cgit v1.2.3-59-g8ed1b