Skip to content

Commit 1e3872c

Browse files
westeriandy-shev
authored andcommitted
platform/x86: intel_pmc_ipc: Use octal permissions in sysfs attributes
This is the current preferred way so replace the S_IWUSR with the corresponding octal value. While there move the attributes to follow directly their store functions. Signed-off-by: Mika Westerberg <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 63d91d8 commit 1e3872c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/platform/x86/intel_pmc_ipc.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ static ssize_t intel_pmc_ipc_simple_cmd_store(struct device *dev,
502502
}
503503
return (ssize_t)count;
504504
}
505+
static DEVICE_ATTR(simplecmd, 0200, NULL, intel_pmc_ipc_simple_cmd_store);
505506

506507
static ssize_t intel_pmc_ipc_northpeak_store(struct device *dev,
507508
struct device_attribute *attr,
@@ -525,11 +526,7 @@ static ssize_t intel_pmc_ipc_northpeak_store(struct device *dev,
525526
}
526527
return (ssize_t)count;
527528
}
528-
529-
static DEVICE_ATTR(simplecmd, S_IWUSR,
530-
NULL, intel_pmc_ipc_simple_cmd_store);
531-
static DEVICE_ATTR(northpeak, S_IWUSR,
532-
NULL, intel_pmc_ipc_northpeak_store);
529+
static DEVICE_ATTR(northpeak, 0200, NULL, intel_pmc_ipc_northpeak_store);
533530

534531
static struct attribute *intel_ipc_attrs[] = {
535532
&dev_attr_northpeak.attr,

0 commit comments

Comments
 (0)