lkml.org 
[lkml]   [2014]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 17/38] tick-common: call tick_install_replacement() from tick_check_new_device()
Date
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@linaro.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


\
 
 \ /
  Last update: 2014-04-14 23:01    [W:0.140 / U:18.916 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site