[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1673b3362965e31fb45482f5df9e59bfcc2e3f53.1397492345.git.viresh.kumar@linaro.org>
Date: Mon, 14 Apr 2014 21:53:39 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: tglx@...utronix.de
Cc: linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
fweisbec@...il.com, Arvind.Chauhan@....com,
linaro-networking@...aro.org,
Viresh Kumar <viresh.kumar@...aro.org>
Subject: [PATCH 17/38] tick-common: call tick_install_replacement() from tick_check_new_device()
Part of tick_check_new_device() is exactly same as what's being done by
tick_install_replacement(). And so we can actually call
tick_install_replacement() directly from tick_check_new_device() instead of
replicating code.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
kernel/time/tick-common.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index c2aa441..bb9a218 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -272,9 +272,7 @@ bool tick_check_preferred(struct clock_event_device *curdev,
*/
void tick_check_new_device(struct clock_event_device *newdev)
{
- int cpu = smp_processor_id();
- struct tick_device *td = tick_get_device(cpu);
- struct clock_event_device *curdev = td->evtdev;
+ struct clock_event_device *curdev = tick_get_cpu_device()->evtdev;
/* Preference decision */
if (!tick_check_preferred(curdev, newdev))
@@ -292,10 +290,8 @@ void tick_check_new_device(struct clock_event_device *newdev)
clockevents_shutdown(curdev);
curdev = NULL;
}
- clockevents_exchange_device(curdev, newdev);
- tick_setup_device(td, newdev, cpu);
- if (newdev->features & CLOCK_EVT_FEAT_ONESHOT)
- tick_oneshot_notify();
+
+ tick_install_replacement(newdev);
return;
out_bc:
--
1.7.12.rc2.18.g61b472e
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists