From b6b996b6cdeecf7e1646c87422e04e446ddce124 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 19 Dec 2017 10:15:07 -0800 Subject: treewide: Use DEVICE_ATTR_RW Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible. Done with perl script: $ git grep -w --name-only DEVICE_ATTR | \ xargs perl -i -e 'local $/; while (<>) { s/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,\s*\(?(\s*S_IRUGO\s*\|\s*S_IWUSR|\s*S_IWUSR\s*\|\s*S_IRUGO\s*|\s*0644\s*)\)?\s*,\s*\1_show\s*,\s*\1_store\s*\)/DEVICE_ATTR_RW(\1)/g; print;}' Signed-off-by: Joe Perches Acked-by: Felipe Balbi Acked-by: Andy Shevchenko Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Zhang Rui Acked-by: Jarkko Nikula Acked-by: Jani Nikula Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/auo_k190x.c | 4 ++-- drivers/video/fbdev/w100fb.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/auo_k190x.c b/drivers/video/fbdev/auo_k190x.c index 0d060383..1e383c5 100644 --- a/drivers/video/fbdev/auo_k190x.c +++ b/drivers/video/fbdev/auo_k190x.c @@ -708,8 +708,8 @@ static ssize_t temp_show(struct device *dev, struct device_attribute *attr, return sprintf(buf, "%d\n", temp); } -static DEVICE_ATTR(update_mode, 0644, update_mode_show, update_mode_store); -static DEVICE_ATTR(flash, 0644, flash_show, flash_store); +static DEVICE_ATTR_RW(update_mode); +static DEVICE_ATTR_RW(flash); static DEVICE_ATTR(temp, 0644, temp_show, NULL); static struct attribute *auok190x_attributes[] = { diff --git a/drivers/video/fbdev/w100fb.c b/drivers/video/fbdev/w100fb.c index d570e19..035ff6e 100644 --- a/drivers/video/fbdev/w100fb.c +++ b/drivers/video/fbdev/w100fb.c @@ -110,7 +110,7 @@ static ssize_t flip_store(struct device *dev, struct device_attribute *attr, con return count; } -static DEVICE_ATTR(flip, 0644, flip_show, flip_store); +static DEVICE_ATTR_RW(flip); static ssize_t w100fb_reg_read(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { @@ -166,7 +166,7 @@ static ssize_t fastpllclk_store(struct device *dev, struct device_attribute *att return count; } -static DEVICE_ATTR(fastpllclk, 0644, fastpllclk_show, fastpllclk_store); +static DEVICE_ATTR_RW(fastpllclk); /* * Some touchscreens need hsync information from the video driver to -- cgit v1.1