Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

switch sysfs_chmod_file() to umode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 48176a97 d161a13f

+6 -6
+3 -3
drivers/hwmon/dme1737.c
··· 1223 1223 } 1224 1224 1225 1225 static struct attribute *dme1737_pwm_chmod_attr[]; 1226 - static void dme1737_chmod_file(struct device*, struct attribute*, mode_t); 1226 + static void dme1737_chmod_file(struct device*, struct attribute*, umode_t); 1227 1227 1228 1228 static ssize_t set_pwm(struct device *dev, struct device_attribute *attr, 1229 1229 const char *buf, size_t count) ··· 1961 1961 static int dme1737_i2c_get_features(int, struct dme1737_data*); 1962 1962 1963 1963 static void dme1737_chmod_file(struct device *dev, 1964 - struct attribute *attr, mode_t mode) 1964 + struct attribute *attr, umode_t mode) 1965 1965 { 1966 1966 if (sysfs_chmod_file(&dev->kobj, attr, mode)) { 1967 1967 dev_warn(dev, "Failed to change permissions of %s.\n", ··· 1971 1971 1972 1972 static void dme1737_chmod_group(struct device *dev, 1973 1973 const struct attribute_group *group, 1974 - mode_t mode) 1974 + umode_t mode) 1975 1975 { 1976 1976 struct attribute **attr; 1977 1977
+1 -1
fs/sysfs/file.c
··· 618 618 * 619 619 */ 620 620 int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr, 621 - mode_t mode) 621 + umode_t mode) 622 622 { 623 623 struct sysfs_dirent *sd; 624 624 struct iattr newattrs;
+2 -2
include/linux/sysfs.h
··· 133 133 int __must_check sysfs_create_files(struct kobject *kobj, 134 134 const struct attribute **attr); 135 135 int __must_check sysfs_chmod_file(struct kobject *kobj, 136 - const struct attribute *attr, mode_t mode); 136 + const struct attribute *attr, umode_t mode); 137 137 void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); 138 138 void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); 139 139 ··· 221 221 } 222 222 223 223 static inline int sysfs_chmod_file(struct kobject *kobj, 224 - const struct attribute *attr, mode_t mode) 224 + const struct attribute *attr, umode_t mode) 225 225 { 226 226 return 0; 227 227 }