Commit 7f752e13 authored by Aishwarya Pant's avatar Aishwarya Pant Committed by Greg Kroah-Hartman

staging: iio: trigger: blackfin timer: replace device_attr with device_attr_rw

This is a clean-up patch which replaces DEVICE_ATTR() macro with the
file permission specific DEVICE_ATTR_RW() macro for compaction and
readability. Done using coccinelle.
Signed-off-by: default avatarAishwarya Pant <aishpant@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 13e6bac8
...@@ -78,7 +78,7 @@ static int iio_bfin_tmr_set_state(struct iio_trigger *trig, bool state) ...@@ -78,7 +78,7 @@ static int iio_bfin_tmr_set_state(struct iio_trigger *trig, bool state)
return 0; return 0;
} }
static ssize_t iio_bfin_tmr_frequency_store(struct device *dev, static ssize_t frequency_store(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
...@@ -116,7 +116,7 @@ static ssize_t iio_bfin_tmr_frequency_store(struct device *dev, ...@@ -116,7 +116,7 @@ static ssize_t iio_bfin_tmr_frequency_store(struct device *dev,
return count; return count;
} }
static ssize_t iio_bfin_tmr_frequency_show(struct device *dev, static ssize_t frequency_show(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
char *buf) char *buf)
{ {
...@@ -133,8 +133,7 @@ static ssize_t iio_bfin_tmr_frequency_show(struct device *dev, ...@@ -133,8 +133,7 @@ static ssize_t iio_bfin_tmr_frequency_show(struct device *dev,
return sprintf(buf, "%lu\n", val); return sprintf(buf, "%lu\n", val);
} }
static DEVICE_ATTR(frequency, 0644, iio_bfin_tmr_frequency_show, static DEVICE_ATTR_RW(frequency);
iio_bfin_tmr_frequency_store);
static struct attribute *iio_bfin_tmr_trigger_attrs[] = { static struct attribute *iio_bfin_tmr_trigger_attrs[] = {
&dev_attr_frequency.attr, &dev_attr_frequency.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment