lkml.org 
[lkml]   [2020]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iio: accel: Replace symbolic permissions with octal permissions
Date
Resolve following checkpatch issue:
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
using octal permissions '0444'.

Signed-off-by: Mugilraj D <dmugil2000@gmail.com>
---
drivers/iio/accel/bma180.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 265722e..b716347 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -531,14 +531,13 @@ static ssize_t bma180_show_scale_avail(struct device *dev,
}

static IIO_DEVICE_ATTR(in_accel_filter_low_pass_3db_frequency_available,
- S_IRUGO, bma180_show_filter_freq_avail, NULL, 0);
+ 0444, bma180_show_filter_freq_avail, NULL, 0);

static IIO_DEVICE_ATTR(in_accel_scale_available,
- S_IRUGO, bma180_show_scale_avail, NULL, 0);
+ 0444, bma180_show_scale_avail, NULL, 0);

static struct attribute *bma180_attributes[] = {
- &iio_dev_attr_in_accel_filter_low_pass_3db_frequency_available.
- dev_attr.attr,
+ &iio_dev_attr_in_accel_filter_low_pass_3db_frequency_available.dev_attr.attr,
&iio_dev_attr_in_accel_scale_available.dev_attr.attr,
NULL,
};
--
2.7.4
\
 
 \ /
  Last update: 2020-06-13 10:19    [W:0.041 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site