diff options
author | Joe Perches <joe@perches.com> | 2017-12-19 21:15:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-09 18:33:31 +0300 |
commit | b6b996b6cdeecf7e1646c87422e04e446ddce124 (patch) | |
tree | ef1b873db80200b159624ce2611137024abf1672 /drivers/video/fbdev/w100fb.c | |
parent | 353c6ddaa963d453dc56ced2f3cbfd9bd57409c7 (diff) | |
download | linux-b6b996b6cdeecf7e1646c87422e04e446ddce124.tar.xz |
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 <joe@perches.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/fbdev/w100fb.c')
-rw-r--r-- | drivers/video/fbdev/w100fb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/w100fb.c b/drivers/video/fbdev/w100fb.c index d570e19a2864..035ff6e02894 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 |