mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
rk1000: fix create sysfs file permission error.
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user