mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
ANDROID: GKI: kernel: tick-sched: Move wake callback registration code
The code to register a wakeup callback exists outside of the #ifdef
CONFIG_HIGH_RES_TIMERS which actually uses it, causing compilation errors.
Move it inside the block, where it belongs.
Bug: 162654685
Fixes: 4c3d3d24dd ("kernel: tick-sched: Add an API for wakeup callbacks")
Change-Id: I3876481c71d63f4cc655280bdd183024b70897c8
Signed-off-by: J. Avila <elavila@google.com>
This commit is contained in:
@@ -1262,6 +1262,15 @@ void tick_irq_enter(void)
|
||||
|
||||
static void (*wake_callback)(void);
|
||||
|
||||
void register_tick_sched_wakeup_callback(void (*cb)(void))
|
||||
{
|
||||
if (!wake_callback)
|
||||
wake_callback = cb;
|
||||
else
|
||||
pr_warn("tick-sched wake cb already exists; skipping.\n");
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(register_tick_sched_wakeup_callback);
|
||||
|
||||
/*
|
||||
* We rearm the timer until we get disabled by the idle code.
|
||||
* Called with interrupts disabled.
|
||||
@@ -1404,15 +1413,6 @@ int tick_check_oneshot_change(int allow_nohz)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void register_tick_sched_wakeup_callback(void (*cb)(void))
|
||||
{
|
||||
if (!wake_callback)
|
||||
wake_callback = cb;
|
||||
else
|
||||
pr_warn("tick-sched wake cb already exists; skipping.\n");
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(register_tick_sched_wakeup_callback);
|
||||
|
||||
ktime_t *get_next_event_cpu(unsigned int cpu)
|
||||
{
|
||||
return &(per_cpu(tick_cpu_device, cpu).evtdev->next_event);
|
||||
|
||||
Reference in New Issue
Block a user