summaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-07-02 16:54:05 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-05 13:53:34 -0700
commit49c19400f60bbe362202d7e7b3e68cc66040d0fa (patch)
treec514cf3270a81a199bac36feee020a98d05db9c5 /include/linux/sysfs.h
parent3317fad5e9c741e758707879c68e20de2cb08f87 (diff)
downloadop-kernel-dev-49c19400f60bbe362202d7e7b3e68cc66040d0fa.zip
op-kernel-dev-49c19400f60bbe362202d7e7b3e68cc66040d0fa.tar.gz
sysfs: sysfs_chmod_file's attr can be const
sysfs_chmod_file doesn't change the attribute it operates on, so this attribute can be marked const. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index f2694eb..8bf06b6 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -136,8 +136,8 @@ int __must_check sysfs_create_file(struct kobject *kobj,
const struct attribute *attr);
int __must_check sysfs_create_files(struct kobject *kobj,
const struct attribute **attr);
-int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr,
- mode_t mode);
+int __must_check sysfs_chmod_file(struct kobject *kobj,
+ const struct attribute *attr, mode_t mode);
void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr);
void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr);
@@ -225,7 +225,7 @@ static inline int sysfs_create_files(struct kobject *kobj,
}
static inline int sysfs_chmod_file(struct kobject *kobj,
- struct attribute *attr, mode_t mode)
+ const struct attribute *attr, mode_t mode)
{
return 0;
}
OpenPOWER on IntegriCloud