]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ab8500-chargalg: Only root should have write permission on sysfs file
authorLee Jones <lee.jones@linaro.org>
Thu, 17 Jan 2013 14:21:53 +0000 (14:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Mar 2013 22:06:44 +0000 (06:06 +0800)
commit e3455002d04276c256a531f7175dce0f7d1cb78a upstream.

Only root should have write permission on sysfs file ab8500_chargalg/chargalg.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/abx500_chargalg.c

index 804b88c760d6bf0a375c486ada3d527bf204d109..d8cd1517c84219d892a949123a04862500e0e1ca 100644 (file)
@@ -1698,7 +1698,7 @@ static ssize_t abx500_chargalg_sysfs_charger(struct kobject *kobj,
 static struct attribute abx500_chargalg_en_charger = \
 {
        .name = "chargalg",
-       .mode = S_IWUGO,
+       .mode = S_IWUSR,
 };
 
 static struct attribute *abx500_chargalg_chg[] = {