aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Blaesius <skate4life@gmx.de>2017-03-27 20:22:21 +0200
committerAndreas Blaesius <skate4life@gmx.de>2017-03-27 22:17:16 +0200
commit8746df7ecae79bc12af120e291380fef0f57a5ce (patch)
treef734bbef612a345d2f1a0859c1367560b1869db9
parentfb0eb00e657692c2ac3d5c05f063ae35c2c8543d (diff)
downloadkernel_samsung_espresso10-8746df7ecae79bc12af120e291380fef0f57a5ce.zip
kernel_samsung_espresso10-8746df7ecae79bc12af120e291380fef0f57a5ce.tar.gz
kernel_samsung_espresso10-8746df7ecae79bc12af120e291380fef0f57a5ce.tar.bz2
espresso: resolve 3.0/3.4 kernel madness about board properties sysfs
Also add /sys/board/type which is a duplicate of /sys/board_properties/type Change-Id: Ia67318ea4fa7fc8c48b670953cc40b7ab35dd18b
-rw-r--r--arch/arm/mach-omap2/board-espresso.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-espresso.c b/arch/arm/mach-omap2/board-espresso.c
index 712a1d0..ae11961 100644
--- a/arch/arm/mach-omap2/board-espresso.c
+++ b/arch/arm/mach-omap2/board-espresso.c
@@ -368,6 +368,28 @@ err_board_obj:
pr_err("failed to create board_properties\n");
}
+static void __init espresso_create_board_type_prop(void)
+{
+ struct kobject *board_kobj;
+ int ret = 0;
+
+ board_kobj = kobject_create_and_add("board", NULL);
+ if (!board_kobj)
+ goto err_board_obj;
+
+ ret = sysfs_create_group(board_kobj, &espresso_board_prop_attr_group);
+ if (ret)
+ goto err_board_sysfs_create;
+
+ return;
+
+err_board_sysfs_create:
+ kobject_put(board_kobj);
+err_board_obj:
+ if (!board_kobj || ret)
+ pr_err("failed to create espresso board properties\n");
+}
+
static void __init sec_common_init(void)
{
sec_class = class_create(THIS_MODULE, "sec");
@@ -396,6 +418,8 @@ static void __init espresso_init(void)
/* initialize board props */
omap4_espresso_create_board_props();
+ /* resolve 3.0/3.4 kernel madness about board properties sysfs */
+ espresso_create_board_type_prop();
/* initialize each drivers */
omap4_espresso_serial_init();