]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
leds: lm3642: Fix up world writable sysfs files
authorAxel Lin <axel.lin@ingics.com>
Mon, 29 Oct 2012 08:41:46 +0000 (01:41 -0700)
committerBryan Wu <roc@roc-samos.(none)>
Thu, 1 Nov 2012 22:48:03 +0000 (15:48 -0700)
We don't need these sysfs files to be world writable or group writable.
These files are write-only, change them to S_IWUSR (0200).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: G.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-lm3642.c

index b69acac6d711cad1245cf263c7679505ef4561fb..83fc7d70da1289fb4fa1693824677f198ddd9473 100644 (file)
@@ -207,7 +207,7 @@ out_strtoint:
        return ret;
 }
 
-static DEVICE_ATTR(torch_pin, 0666, NULL, lm3642_torch_pin_store);
+static DEVICE_ATTR(torch_pin, S_IWUSR, NULL, lm3642_torch_pin_store);
 
 static void lm3642_deferred_torch_brightness_set(struct work_struct *work)
 {
@@ -264,7 +264,7 @@ out_strtoint:
        return ret;
 }
 
-static DEVICE_ATTR(strobe_pin, 0666, NULL, lm3642_strobe_pin_store);
+static DEVICE_ATTR(strobe_pin, S_IWUSR, NULL, lm3642_strobe_pin_store);
 
 static void lm3642_deferred_strobe_brightness_set(struct work_struct *work)
 {