From 587a1f1659e8b330b8738ef4901832a2b63f0bed Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 23 Jul 2011 23:11:19 -0400 Subject: switch ->is_visible() to returning umode_t Signed-off-by: Al Viro --- drivers/hwmon/jc42.c | 2 +- drivers/hwmon/max1668.c | 4 ++-- drivers/hwmon/max6650.c | 2 +- drivers/hwmon/tmp421.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/hwmon') diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c index 2d3d72805ff4..1a92951f4031 100644 --- a/drivers/hwmon/jc42.c +++ b/drivers/hwmon/jc42.c @@ -413,7 +413,7 @@ static struct attribute *jc42_attributes[] = { NULL }; -static mode_t jc42_attribute_mode(struct kobject *kobj, +static umode_t jc42_attribute_mode(struct kobject *kobj, struct attribute *attr, int index) { struct device *dev = container_of(kobj, struct device, kobj); diff --git a/drivers/hwmon/max1668.c b/drivers/hwmon/max1668.c index 20d1b2ddffb6..6914195cfd35 100644 --- a/drivers/hwmon/max1668.c +++ b/drivers/hwmon/max1668.c @@ -335,10 +335,10 @@ static struct attribute *max1668_attribute_unique[] = { NULL }; -static mode_t max1668_attribute_mode(struct kobject *kobj, +static umode_t max1668_attribute_mode(struct kobject *kobj, struct attribute *attr, int index) { - int ret = S_IRUGO; + umode_t ret = S_IRUGO; if (read_only) return ret; if (attr == &sensor_dev_attr_temp1_max.dev_attr.attr || diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index ece3aafa54b3..2fc034aeca09 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c @@ -464,7 +464,7 @@ static SENSOR_DEVICE_ATTR(gpio1_alarm, S_IRUGO, get_alarm, NULL, static SENSOR_DEVICE_ATTR(gpio2_alarm, S_IRUGO, get_alarm, NULL, MAX6650_ALRM_GPIO2); -static mode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a, +static umode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a, int n) { struct device *dev = container_of(kobj, struct device, kobj); diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c index 0517a8f09d35..c48381f2cd02 100644 --- a/drivers/hwmon/tmp421.c +++ b/drivers/hwmon/tmp421.c @@ -157,7 +157,7 @@ static ssize_t show_fault(struct device *dev, return sprintf(buf, "0\n"); } -static mode_t tmp421_is_visible(struct kobject *kobj, struct attribute *a, +static umode_t tmp421_is_visible(struct kobject *kobj, struct attribute *a, int n) { struct device *dev = container_of(kobj, struct device, kobj); -- cgit v1.2.3-55-g7522 From 48176a973d65572e61d0ce95495e5072887e6fb6 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 24 Jul 2011 03:40:40 -0400 Subject: switch sysfs_chmod_file() to umode_t Signed-off-by: Al Viro --- drivers/hwmon/dme1737.c | 6 +++--- fs/sysfs/file.c | 2 +- include/linux/sysfs.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/hwmon') diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c index d9c592713919..d9803958e49f 100644 --- a/drivers/hwmon/dme1737.c +++ b/drivers/hwmon/dme1737.c @@ -1223,7 +1223,7 @@ static ssize_t show_pwm(struct device *dev, struct device_attribute *attr, } static struct attribute *dme1737_pwm_chmod_attr[]; -static void dme1737_chmod_file(struct device*, struct attribute*, mode_t); +static void dme1737_chmod_file(struct device*, struct attribute*, umode_t); static ssize_t set_pwm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) @@ -1961,7 +1961,7 @@ static inline void dme1737_sio_outb(int sio_cip, int reg, int val) static int dme1737_i2c_get_features(int, struct dme1737_data*); static void dme1737_chmod_file(struct device *dev, - struct attribute *attr, mode_t mode) + struct attribute *attr, umode_t mode) { if (sysfs_chmod_file(&dev->kobj, attr, mode)) { dev_warn(dev, "Failed to change permissions of %s.\n", @@ -1971,7 +1971,7 @@ static void dme1737_chmod_file(struct device *dev, static void dme1737_chmod_group(struct device *dev, const struct attribute_group *group, - mode_t mode) + umode_t mode) { struct attribute **attr; diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index d4e6080b4b20..120c3adff6b0 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -618,7 +618,7 @@ EXPORT_SYMBOL_GPL(sysfs_add_file_to_group); * */ int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr, - mode_t mode) + umode_t mode) { struct sysfs_dirent *sd; struct iattr newattrs; diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index e90eea7afb4e..0010009b2f00 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -133,7 +133,7 @@ int __must_check sysfs_create_file(struct kobject *kobj, int __must_check sysfs_create_files(struct kobject *kobj, const struct attribute **attr); int __must_check sysfs_chmod_file(struct kobject *kobj, - const struct attribute *attr, mode_t mode); + const struct attribute *attr, umode_t mode); void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); @@ -221,7 +221,7 @@ static inline int sysfs_create_files(struct kobject *kobj, } static inline int sysfs_chmod_file(struct kobject *kobj, - const struct attribute *attr, mode_t mode) + const struct attribute *attr, umode_t mode) { return 0; } -- cgit v1.2.3-55-g7522