summaryrefslogtreecommitdiffstats
path: root/drivers/w1/slaves/w1_ds2406.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-04-15 12:42:54 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-20 14:15:06 +0200
commit921e0f2fb09d8decfa8f19eae01f0b68e322363e (patch)
treea42db6e1f7cc60f1f1354a01b350a4f25992a2f3 /drivers/w1/slaves/w1_ds2406.c
parentw1: minor white-space and code style fixes (diff)
downloadlinux-921e0f2fb09d8decfa8f19eae01f0b68e322363e.tar.xz
linux-921e0f2fb09d8decfa8f19eae01f0b68e322363e.zip
w1: use octal for file permissions
Improve code readability and checkpatch warnings: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-6-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/slaves/w1_ds2406.c')
-rw-r--r--drivers/w1/slaves/w1_ds2406.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/w1/slaves/w1_ds2406.c b/drivers/w1/slaves/w1_ds2406.c
index 3bb88b51fe2b..2f5926859b8b 100644
--- a/drivers/w1/slaves/w1_ds2406.c
+++ b/drivers/w1/slaves/w1_ds2406.c
@@ -99,7 +99,7 @@ static struct bin_attribute w1_f12_sysfs_bin_files[NB_SYSFS_BIN_FILES] = {
{
.attr = {
.name = "state",
- .mode = S_IRUGO,
+ .mode = 0444,
},
.size = 1,
.read = w1_f12_read_state,
@@ -107,7 +107,7 @@ static struct bin_attribute w1_f12_sysfs_bin_files[NB_SYSFS_BIN_FILES] = {
{
.attr = {
.name = "output",
- .mode = S_IRUGO | S_IWUSR | S_IWGRP,
+ .mode = 0664,
},
.size = 1,
.write = w1_f12_write_output,