projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
598440e
)
rk1000: fix create sysfs file permission error.
author
Zheng Yang
<zhengyang@rock-chips.com>
Thu, 4 Jun 2015 07:35:35 +0000
(15:35 +0800)
committer
Zheng Yang
<zhengyang@rock-chips.com>
Thu, 4 Jun 2015 07:35:35 +0000
(15:35 +0800)
Wrong permission will case following warning:
------------[ cut here ]------------
WARNING: at drivers/base/core.c:576 device_create_file+0x74/0xa4()
Attribute rkcontrl: write permission without 'store'
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0 #247
Call trace:
[<
ffffffc000087dc0
>] dump_backtrace+0x0/0x10c
[<
ffffffc000087edc
>] show_stack+0x10/0x1c
[<
ffffffc00087c0e4
>] dump_stack+0x1c/0x28
[<
ffffffc0000a1b08
>] warn_slowpath_common+0x74/0x9c
[<
ffffffc0000a1b7c
>] warn_slowpath_fmt+0x4c/0x58
[<
ffffffc00036cfec
>] device_create_file+0x70/0xa4
[<
ffffffc000399fc4
>] rk1000_probe+0x1d0/0x20c
[<
ffffffc00058b190
>] i2c_device_probe+0x9c/0xd4
[<
ffffffc000370e70
>] driver_probe_device+0xd0/0x210
[<
ffffffc00037105c
>] __driver_attach+0x60/0x90
[<
ffffffc00036f394
>] bus_for_each_dev+0x60/0x88
[<
ffffffc00037096c
>] driver_attach+0x1c/0x28
[<
ffffffc000370540
>] bus_add_driver+0xf4/0x210
[<
ffffffc000371698
>] driver_register+0xbc/0x138
[<
ffffffc00058b054
>] i2c_register_driver+0x48/0xac
[<
ffffffc000bf2934
>] rk1000_init+0x14/0x20
[<
ffffffc000081554
>] do_one_initcall+0x80/0x120
[<
ffffffc000bdb8f0
>] kernel_init_freeable+0x148/0x1e8
[<
ffffffc000876a10
>] kernel_init+0x10/0xcc
---[ end trace
1cc1e45d37744cff
]---
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
drivers/mfd/rk1000-core.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/rk1000-core.c
b/drivers/mfd/rk1000-core.c
index 975f467165c55fdb6d84a7a466f34a1e2f0fb184..1aa3d2ce5b9e9eb628d196f2b7ec610988b5cae5 100755
(executable)
--- a/
drivers/mfd/rk1000-core.c
+++ b/
drivers/mfd/rk1000-core.c
@@
-135,7
+135,7
@@
static ssize_t rk1000_show(struct device *dev,
return 0;
}
-static DEVICE_ATTR(rkcontrl,
0666
, rk1000_show, NULL);
+static DEVICE_ATTR(rkcontrl,
S_IRUGO
, rk1000_show, NULL);
static int __init bootloader_cvbs_setup(char *str)