rtc: ds1343: replace symbolic permissions with octal
PATCH 1/1 rtc: ds1343: replace symbolic permissions with octal
Symbolic permissions S_IRUGO and S_IWUSR are deprecated in favor of octal permissions. Replace S_IRUGO|S_IWUSR with 0644 and S_IRUGO with 0444.
Signed-off-by Jack Lee <[email protected]>
--- drivers/rtc/rtc-ds1343.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-ds1343.c +2 -2
@@ -120,7 +120,7 @@ static ssize_t ds1343_store_glitchfilter(struct device *dev,return count; } -static DEVICE_ATTR(glitch_filter, S_IRUGO | S_IWUSR, ds1343_show_glitchfilter, +static DEVICE_ATTR(glitch_filter, 0644, ds1343_show_glitchfilter, ds1343_store_glitchfilter); static int ds1343_nvram_write(void *priv, unsigned int off, void *val,
@@ -183,7 +183,7 @@ static ssize_t ds1343_show_tricklecharger(struct device *dev,return sprintf (buf,"%s %s\n" , diodes, resistors); } -static DEVICE_ATTR(trickle_charger, S_IRUGO, ds1343_show_tricklecharger, NULL); +static DEVICE_ATTR(trickle_charger, 0444, ds1343_show_tricklecharger, NULL);static struct attribute *ds1343_attrs[] = { &dev_attr_glitch_filter.attr,
Signature · 1 line
2.54.0
Quoted 3 lines · Jack Lee
Symbolic permissions
S_IRUGOandS_IWUSRare deprecated in favor of octal permissions. Replace S_IRUGO|S_IWUSR with 0644 andS_IRUGOwith 0444.
Applied, thanks!
[1/1] rtc: ds1343: replace symbolic permissions with octal
https://git.kernel.org/abelloni/c/2943ec93ee6f
Best regards,
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com