diff options
author | Joe Perches <joe@perches.com> | 2017-12-19 10:15:08 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-09 16:34:34 +0100 |
commit | c828a8920307185b7194b575731e8387c99a5a67 (patch) | |
tree | ba6d8d4416693df1b322938fbb3eaceea1322df9 /sound | |
parent | b6b996b6cdeecf7e1646c87422e04e446ddce124 (diff) | |
download | op-kernel-dev-c828a8920307185b7194b575731e8387c99a5a67.zip op-kernel-dev-c828a8920307185b7194b575731e8387c99a5a67.tar.gz |
treewide: Use DEVICE_ATTR_RO
Convert DEVICE_ATTR uses to DEVICE_ATTR_RO 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*0444\s*)\)?\s*,\s*\1_show\s*,\s*NULL\s*\)/DEVICE_ATTR_RO(\1)/g; print;}'
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c0edac8..11cfe42 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -173,7 +173,7 @@ static ssize_t codec_reg_show(struct device *dev, return soc_codec_reg_show(rtd->codec, buf, PAGE_SIZE, 0); } -static DEVICE_ATTR(codec_reg, 0444, codec_reg_show, NULL); +static DEVICE_ATTR_RO(codec_reg); static ssize_t pmdown_time_show(struct device *dev, struct device_attribute *attr, char *buf) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index a10b21c..d1977ce 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2364,7 +2364,7 @@ static ssize_t dapm_widget_show(struct device *dev, return count; } -static DEVICE_ATTR(dapm_widget, 0444, dapm_widget_show, NULL); +static DEVICE_ATTR_RO(dapm_widget); struct attribute *soc_dapm_dev_attrs[] = { &dev_attr_dapm_widget.attr, |