Skip to content

Commit 16b0dd4

Browse files
Jinchao Wanggregkh
authored andcommitted
driver: base: Replace symbolic permissions with octal permissions
Resolve following checkpatch issue, Replace symbolic permissions with octal permissions Signed-off-by: Jinchao Wang <wjc@cdjrlc.com> Link: https://lore.kernel.org/r/20210626094606.53152-1-wjc@cdjrlc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fc7a620 commit 16b0dd4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/base/bus.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static ssize_t unbind_store(struct device_driver *drv, const char *buf,
195195
bus_put(bus);
196196
return err;
197197
}
198-
static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, S_IWUSR, NULL, unbind_store);
198+
static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, 0200, NULL, unbind_store);
199199

200200
/*
201201
* Manually attach a device to a driver.
@@ -221,7 +221,7 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf,
221221
bus_put(bus);
222222
return err;
223223
}
224-
static DRIVER_ATTR_IGNORE_LOCKDEP(bind, S_IWUSR, NULL, bind_store);
224+
static DRIVER_ATTR_IGNORE_LOCKDEP(bind, 0200, NULL, bind_store);
225225

226226
static ssize_t drivers_autoprobe_show(struct bus_type *bus, char *buf)
227227
{
@@ -767,7 +767,7 @@ static ssize_t bus_uevent_store(struct bus_type *bus,
767767
* DEVICE_ATTR_WO(uevent), which would cause a clash with the with the store
768768
* function name.
769769
*/
770-
static struct bus_attribute bus_attr_uevent = __ATTR(uevent, S_IWUSR, NULL,
770+
static struct bus_attribute bus_attr_uevent = __ATTR(uevent, 0200, NULL,
771771
bus_uevent_store);
772772

773773
/**

‎drivers/base/power/wakeup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ static const struct file_operations wakeup_sources_stats_fops = {
11801180

11811181
static int __init wakeup_sources_debugfs_init(void)
11821182
{
1183-
debugfs_create_file("wakeup_sources", S_IRUGO, NULL, NULL,
1183+
debugfs_create_file("wakeup_sources", 0444, NULL, NULL,
11841184
&wakeup_sources_stats_fops);
11851185
return 0;
11861186
}

0 commit comments

Comments
 (0)