From: Axel Lin Date: Mon, 29 Oct 2012 08:41:46 +0000 (-0700) Subject: leds: lm3642: Fix up world writable sysfs files X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5cce0105c8d07d3bd5f578c77d273e1a1e09f157;p=openwrt%2Fstaging%2Fblogic.git leds: lm3642: Fix up world writable sysfs files 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 Acked-by: G.Shark Jeong Signed-off-by: Bryan Wu --- diff --git a/drivers/leds/leds-lm3642.c b/drivers/leds/leds-lm3642.c index b69acac6d711..83fc7d70da12 100644 --- a/drivers/leds/leds-lm3642.c +++ b/drivers/leds/leds-lm3642.c @@ -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) {