From 42cf5c1159316098989b25d92d0d26617c5a71d3 Mon Sep 17 00:00:00 2001 From: Daeyeong Lee Date: Fri, 23 Mar 2018 16:28:34 +0900 Subject: [PATCH] [COMMON] sched: ems: Move lbt/ontime node from ehmp to ems Change-Id: I3422985e2cd8f2d1235f983934af5b401326a7b9 Signed-off-by: Daeyeong Lee --- kernel/sched/ems/ehmp.c | 8 -------- kernel/sched/ems/ems.h | 10 ---------- kernel/sched/ems/lbt.c | 5 +++-- kernel/sched/ems/ontime.c | 5 +++-- 4 files changed, 6 insertions(+), 22 deletions(-) diff --git a/kernel/sched/ems/ehmp.c b/kernel/sched/ems/ehmp.c index 36d8f9ce13aa..52ad372016a6 100644 --- a/kernel/sched/ems/ehmp.c +++ b/kernel/sched/ems/ehmp.c @@ -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); diff --git a/kernel/sched/ems/ems.h b/kernel/sched/ems/ems.h index 6e856ad628ea..a3cf41e19253 100644 --- a/kernel/sched/ems/ems.h +++ b/kernel/sched/ems/ems.h @@ -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 diff --git a/kernel/sched/ems/lbt.c b/kernel/sched/ems/lbt.c index 2bda915756cb..359f51794e21 100644 --- a/kernel/sched/ems/lbt.c +++ b/kernel/sched/ems/lbt.c @@ -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 */ diff --git a/kernel/sched/ems/ontime.c b/kernel/sched/ems/ontime.c index a6c79276ef8c..5a4c93e7832f 100644 --- a/kernel/sched/ems/ontime.c +++ b/kernel/sched/ems/ontime.c @@ -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 */ -- 2.20.1