regulator: core: change microvolt permission to 0644
Laxman Dewangan [Fri, 14 Sep 2012 05:42:22 +0000 (10:42 +0530)]
Allow change of voltage through user space with root
permission only.

bug 1004472

Change-Id: I8f96872c9c3915f1e39191a26f2a18acdc9c5d6c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/132529
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

drivers/regulator/core.c

index 5c17c50..bb4fb61 100644 (file)
@@ -363,7 +363,7 @@ static ssize_t regulator_uV_show(struct device *dev,
 
        return ret;
 }
-static DEVICE_ATTR(microvolts, 0666, regulator_uV_show, regulator_uV_set);
+static DEVICE_ATTR(microvolts, 0644, regulator_uV_show, regulator_uV_set);
 
 static ssize_t regulator_uA_show(struct device *dev,
                                struct device_attribute *attr, char *buf)