From 31e5abe9a6dab1ed3a5c30352bdb001353146318 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 18 Apr 2005 21:57:32 -0700 Subject: [PATCH] sysfs: add sysfs_chmod_file() sysfs: allow changing the permissions for already created attributes Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- include/linux/sysfs.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 6f502ff7902..38b58b30814 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -99,6 +99,9 @@ sysfs_create_file(struct kobject *, const struct attribute *); extern int sysfs_update_file(struct kobject *, const struct attribute *); +extern int +sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode); + extern void sysfs_remove_file(struct kobject *, const struct attribute *); @@ -140,6 +143,10 @@ static inline int sysfs_update_file(struct kobject * k, const struct attribute * { return 0; } +static inline int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode) +{ + return 0; +} static inline void sysfs_remove_file(struct kobject * k, const struct attribute * a) { -- cgit v1.2.3