@@ -35,7 +35,7 @@ static const struct config_item_type iio_hrtimer_type = {
};
static
-ssize_t iio_hrtimer_show_sampling_frequency(struct device *dev,
+ssize_t sampling_frequency_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
@@ -46,7 +46,7 @@ ssize_t iio_hrtimer_show_sampling_frequency(struct device *dev,
}
static
-ssize_t iio_hrtimer_store_sampling_frequency(struct device *dev,
+ssize_t sampling_frequency_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
@@ -68,9 +68,7 @@ ssize_t iio_hrtimer_store_sampling_frequency(struct device *dev,
return len;
}
-static DEVICE_ATTR(sampling_frequency, S_IRUGO | S_IWUSR,
- iio_hrtimer_show_sampling_frequency,
- iio_hrtimer_store_sampling_frequency);
+static DEVICE_ATTR_RW(sampling_frequency);
static struct attribute *iio_hrtimer_attrs[] = {
&dev_attr_sampling_frequency.attr,
This is a clean-up patch which replaces DEVICE_ATTR macro with the file permission specific DEVICE_ATTR_{RO/WO/RW} macros for compaction and readability. Done using coccinelle. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> --- drivers/iio/trigger/iio-trig-hrtimer.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)