From: Lee Jones Date: Thu, 17 Jan 2013 14:21:53 +0000 (+0000) Subject: ab8500-chargalg: Only root should have write permission on sysfs file X-Git-Tag: v3.8.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71b9101a2b66f46703573c0a4aeca91b92038dbc;p=thirdparty%2Fkernel%2Fstable.git ab8500-chargalg: Only root should have write permission on sysfs file commit e3455002d04276c256a531f7175dce0f7d1cb78a upstream. Only root should have write permission on sysfs file ab8500_chargalg/chargalg. Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index 2970891460641..eb7b4a6436203 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c @@ -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[] = {