summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fe4b6c2)
raw | patch | inline | side by side (parent: fe4b6c2)
author | Murali Karicheri <m-karicheri2@ti.com> | |
Tue, 20 Jan 2015 17:42:57 +0000 (12:42 -0500) | ||
committer | Murali Karicheri <m-karicheri2@ti.com> | |
Thu, 22 Jan 2015 15:50:12 +0000 (10:50 -0500) |
Currently when CONFIG_DEBUG_LOCKDEP is enabled, following errors are
thrown by the kernel.
"BUG: key ebc25d10 not in .data!"
This patch fixes this issue by using sysfs_attr_init() to initialize the
dynamically allocated attributes. Kernel otherwise expects this to be
declared statically and passed to device_create_file().
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
thrown by the kernel.
"BUG: key ebc25d10 not in .data!"
This patch fixes this issue by using sysfs_attr_init() to initialize the
dynamically allocated attributes. Kernel otherwise expects this to be
declared statically and passed to device_create_file().
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
drivers/net/ethernet/ti/cpsw_ale.c | patch | blob | history |
index 172c024631c80bd37d8a82aaa57b6df27b7cbbeb..b0c4292ef90d8746a8fedbf62bc97e8448613c96 100644 (file)
cpsw_ale_control_set(ale, i, ALE_PORT_STATE, ALE_PORT_STATE_DISABLE);
ale->ale_control_attr = dev_attr_ale_control;
+ sysfs_attr_init(&ale->ale_control_attr.attr);
ret = device_create_file(ale->params.dev, &ale->ale_control_attr);
WARN_ON(ret < 0);
ale->ale_table_attr = dev_attr_ale_table;
+ sysfs_attr_init(&ale->ale_table_attr.attr);
ret = device_create_file(ale->params.dev, &ale->ale_table_attr);
WARN_ON(ret < 0);
ale->ale_table_raw_attr = dev_attr_ale_table_raw;
+ sysfs_attr_init(&ale->ale_table_raw_attr.attr);
ret = device_create_file(ale->params.dev, &ale->ale_table_raw_attr);
WARN_ON(ret < 0);