Skip to content

Commit

Permalink
leds: lm3642: Fix up world writable sysfs files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Bryan Wu committed Nov 26, 2012
1 parent 5bbf150 commit 5cce010
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/leds/leds-lm3642.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static ssize_t lm3642_torch_pin_store(struct device *dev,
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)
{
Expand Down Expand Up @@ -264,7 +264,7 @@ static ssize_t lm3642_strobe_pin_store(struct device *dev,
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)
{
Expand Down

0 comments on commit 5cce010

Please sign in to comment.