Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1528165 > unrolled thread

[PATCH] Staging: iio: adc: fix sysfs files modes in ad7192.c

Started byBoyan Vladinov <nayobix@nayobix.org>
First post2016-11-23 08:50 +0100
Last post2016-11-23 12:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Staging: iio: adc: fix sysfs files modes in ad7192.c Boyan Vladinov <nayobix@nayobix.org> - 2016-11-23 08:50 +0100
    Re: [PATCH] Staging: iio: adc: fix sysfs files modes in ad7192.c Joe Perches <joe@perches.com> - 2016-11-23 12:40 +0100

#1528165 — [PATCH] Staging: iio: adc: fix sysfs files modes in ad7192.c

FromBoyan Vladinov <nayobix@nayobix.org>
Date2016-11-23 08:50 +0100
Subject[PATCH] Staging: iio: adc: fix sysfs files modes in ad7192.c
Message-ID<sGAjU-1SC-9@gated-at.bofh.it>
Fixes sysfs entries user/group modes and coding style warnings
found by checkpatch.pl tool

Signed-off-by: Boyan Vladinov <nayobix@nayobix.org>
---
 drivers/staging/iio/adc/ad7192.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
index 1fb68c01abd5..3f9f54b654f7 100644
--- a/drivers/staging/iio/adc/ad7192.c
+++ b/drivers/staging/iio/adc/ad7192.c
@@ -341,10 +341,10 @@ ad7192_show_scale_available(struct device *dev,
 }
 
 static IIO_DEVICE_ATTR_NAMED(in_v_m_v_scale_available,
-			     in_voltage-voltage_scale_available,
-			     S_IRUGO, ad7192_show_scale_available, NULL, 0);
+			     in_voltage - voltage_scale_available,
+			     0444, ad7192_show_scale_available, NULL, 0);
 
-static IIO_DEVICE_ATTR(in_voltage_scale_available, S_IRUGO,
+static IIO_DEVICE_ATTR(in_voltage_scale_available, 0444,
 		       ad7192_show_scale_available, NULL, 0);
 
 static ssize_t ad7192_show_ac_excitation(struct device *dev,
@@ -412,11 +412,11 @@ static ssize_t ad7192_set(struct device *dev,
 	return ret ? ret : len;
 }
 
-static IIO_DEVICE_ATTR(bridge_switch_en, S_IRUGO | S_IWUSR,
+static IIO_DEVICE_ATTR(bridge_switch_en, 0444 | 0200,
 		       ad7192_show_bridge_switch, ad7192_set,
 		       AD7192_REG_GPOCON);
 
-static IIO_DEVICE_ATTR(ac_excitation_en, S_IRUGO | S_IWUSR,
+static IIO_DEVICE_ATTR(ac_excitation_en, 0444 | 0200,
 		       ad7192_show_ac_excitation, ad7192_set,
 		       AD7192_REG_MODE);
 
-- 
2.7.4

[toc] | [next] | [standalone]


#1528338

FromJoe Perches <joe@perches.com>
Date2016-11-23 12:40 +0100
Message-ID<sGE49-4fv-11@gated-at.bofh.it>
In reply to#1528165
On Tue, 2016-11-22 at 23:25 -0800, Boyan Vladinov wrote:
> Fixes sysfs entries user/group modes and coding style warnings
> found by checkpatch.pl tool
[]
> diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
[]
>  static ssize_t ad7192_show_ac_excitation(struct device *dev,
> @@ -412,11 +412,11 @@ static ssize_t ad7192_set(struct device *dev,
>  	return ret ? ret : len;
>  }
>  
> -static IIO_DEVICE_ATTR(bridge_switch_en, S_IRUGO | S_IWUSR,
> +static IIO_DEVICE_ATTR(bridge_switch_en, 0444 | 0200,

If you are going to submit S_<FOO> -> octal conversions,
please collapse the multiple octal values into one value

0444 | 0200 => 0644

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web