summaryrefslogtreecommitdiffstats
path: root/fs/sysfs
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 22:53:34 +0200
commit49c19400f60bbe362202d7e7b3e68cc66040d0fa (patch)
treec514cf3270a81a199bac36feee020a98d05db9c5 /fs/sysfs
parentfirmware: Update hotplug script (diff)
downloadlinux-49c19400f60bbe362202d7e7b3e68cc66040d0fa.tar.xz
linux-49c19400f60bbe362202d7e7b3e68cc66040d0fa.zip
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 'fs/sysfs')
-rw-r--r--fs/sysfs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 1beaa739d0a6..1b27b5688f62 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -593,7 +593,8 @@ EXPORT_SYMBOL_GPL(sysfs_add_file_to_group);
* @mode: file permissions.
*
*/
-int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode)
+int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr,
+ mode_t mode)
{
struct sysfs_dirent *sd;
struct iattr newattrs;