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)
committerLee Jones <lee.jones@linaro.org>
Wed, 23 Jan 2013 14:39:15 +0000 (14:39 +0000)
Only root should have write permission on sysfs file ab8500_chargalg/chargalg.

Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/power/abx500_chargalg.c

index 2463fa0..f59bc02 100644 (file)
@@ -1711,7 +1711,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[] = {