[COMMON] sched: ems: Move lbt/ontime node from ehmp to ems
authorDaeyeong Lee <daeyeong.lee@samsung.com>
Fri, 23 Mar 2018 07:28:34 +0000 (16:28 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:35:25 +0000 (17:35 +0900)
Change-Id: I3422985e2cd8f2d1235f983934af5b401326a7b9
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
kernel/sched/ems/ehmp.c
kernel/sched/ems/ems.h
kernel/sched/ems/lbt.c
kernel/sched/ems/ontime.c

index 36d8f9ce13aa7b3c4d0de4d512aceed906b1da16..52ad372016a6ea9d6c53c06062c10840fa41e41d 100644 (file)
@@ -882,14 +882,6 @@ static int __init init_sysfs(void)
        if (ret)
                return ret;
 
-       ret = ontime_sysfs_init(ehmp_kobj);
-       if (ret)
-               return ret;
-
-       ret = lbt_sysfs_init(ehmp_kobj);
-       if (ret)
-               return ret;
-
        return 0;
 }
 late_initcall(init_sysfs);
index 6e856ad628ea24be3d31ab2282e1d6e9e7866bb4..a3cf41e192530ef7e836b67785323f89e66f6189 100644 (file)
@@ -33,20 +33,10 @@ static inline int group_balancing(struct task_struct *p) { return -1; }
 #ifdef CONFIG_SCHED_EMS
 extern int
 exynos_wakeup_balance(struct task_struct *p, int sd_flag, int sync);
-extern int __init lbt_sysfs_init(struct kobject *parent);
-extern int __init ontime_sysfs_init(struct kobject *parent);
 #else
 static inline int
 exynos_wakeup_balance(struct task_struct *p, int sd_flag, int sync)
 {
        return -1;
 }
-static inline int __init lbt_sysfs_init(struct kobject *parent)
-{
-       return 0;
-}
-static inline int __init ontime_sysfs_init(struct kobject *parent)
-{
-       return 0;
-}
 #endif
index 2bda915756cbbdc2f231c5ad805df8c59ab69fa6..359f51794e216b867ae85df14d2706532579467f 100644 (file)
@@ -194,7 +194,7 @@ fail_alloc:
        return -ENOMEM;
 }
 
-int __init lbt_sysfs_init(struct kobject *parent)
+static int __init lbt_sysfs_init(void)
 {
        int depth = get_topology_depth();
        int i;
@@ -218,7 +218,7 @@ int __init lbt_sysfs_init(struct kobject *parent)
 
        lbt_group.attrs = lbt_attrs;
 
-       lbt_kobj = kobject_create_and_add("lbt", parent);
+       lbt_kobj = kobject_create_and_add("lbt", ems_kobj);
        if (!lbt_kobj)
                goto out;
 
@@ -234,6 +234,7 @@ out:
        pr_err("LBT(%s): failed to create sysfs node\n", __func__);
        return -EINVAL;
 }
+late_initcall(lbt_sysfs_init);
 
 /****************************************************************/
 /*                     Initialization                          */
index a6c79276ef8c5ec7bf187f5b93a58356596a5e10..5a4c93e7832f84862640121a61d509a351a7c8e9 100644 (file)
@@ -733,7 +733,7 @@ fail_alloc:
        return -ENOMEM;
 }
 
-int __init ontime_sysfs_init(struct kobject *parent)
+static int __init ontime_sysfs_init(void)
 {
        struct ontime_cond *cond = ontime_cond;
        int count, step, i;
@@ -801,7 +801,7 @@ skip:
 
        ontime_group.attrs = ontime_attrs;
 
-       ontime_kobj = kobject_create_and_add("ontime", parent);
+       ontime_kobj = kobject_create_and_add("ontime", ems_kobj);
        if (!ontime_kobj)
                goto out;
 
@@ -816,6 +816,7 @@ out:
        pr_err("ONTIME(%s): failed to create sysfs node\n", __func__);
        return -EINVAL;
 }
+late_initcall(ontime_sysfs_init);
 
 /****************************************************************/
 /*                     initialization                          */