Skip to content

Commit

Permalink
drivers: switch: remove S_IWUSR from dev_attr
Browse files Browse the repository at this point in the history
it doesn't need S_IWUSR attribute since xxx_store API is un-needed.
otherwise the WARN check in device_create_file will alert.

Change-Id: I6360bf022dcd659bfb3f41c84624f954d5d15ea5
Signed-off-by: Qiao Zhou <[email protected]>
  • Loading branch information
Qiao Zhou authored and johnstultz-work committed Feb 16, 2016
1 parent 8e18050 commit dc66dee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/switch/switch_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ static ssize_t name_show(struct device *dev, struct device_attribute *attr,
return sprintf(buf, "%s\n", sdev->name);
}

static DEVICE_ATTR(state, S_IRUGO | S_IWUSR, state_show, NULL);
static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, name_show, NULL);
static DEVICE_ATTR(state, S_IRUGO, state_show, NULL);
static DEVICE_ATTR(name, S_IRUGO, name_show, NULL);

void switch_set_state(struct switch_dev *sdev, int state)
{
Expand Down

0 comments on commit dc66dee

Please sign in to comment.