Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: remove struct sys_timer suspend and resume fields

These fields duplicate e.g. struct clock_event_device's suspend and
resume fields, so remove them now that nothing is using them. The aim
is to remove all fields from struct sys_timer except .init, then replace
the ARM machine descriptor's .timer field with a .init_time function
instead, and delete struct sys_timer.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>

-45
-11
arch/arm/include/asm/mach/time.h
··· 17 17 * Initialise the kernels jiffy timer source, claim interrupt 18 18 * using setup_irq. This is called early on during initialisation 19 19 * while interrupts are still disabled on the local CPU. 20 - * - suspend 21 - * Suspend the kernel jiffy timer source, if necessary. This 22 - * is called with interrupts disabled, after all normal devices 23 - * have been suspended. If no action is required, set this to 24 - * NULL. 25 - * - resume 26 - * Resume the kernel jiffy timer source, if necessary. This 27 - * is called with interrupts disabled before any normal devices 28 - * are resumed. If no action is required, set this to NULL. 29 20 * - offset 30 21 * Return the timer offset in microseconds since the last timer 31 22 * interrupt. Note: this must take account of any unprocessed ··· 24 33 */ 25 34 struct sys_timer { 26 35 void (*init)(void); 27 - void (*suspend)(void); 28 - void (*resume)(void); 29 36 }; 30 37 31 38 extern void timer_tick(void);
-34
arch/arm/kernel/time.c
··· 21 21 #include <linux/timex.h> 22 22 #include <linux/errno.h> 23 23 #include <linux/profile.h> 24 - #include <linux/syscore_ops.h> 25 24 #include <linux/timer.h> 26 25 #include <linux/irq.h> 27 26 ··· 117 118 118 119 return -EINVAL; 119 120 } 120 - 121 - #if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) 122 - static int timer_suspend(void) 123 - { 124 - if (system_timer->suspend) 125 - system_timer->suspend(); 126 - 127 - return 0; 128 - } 129 - 130 - static void timer_resume(void) 131 - { 132 - if (system_timer->resume) 133 - system_timer->resume(); 134 - } 135 - #else 136 - #define timer_suspend NULL 137 - #define timer_resume NULL 138 - #endif 139 - 140 - static struct syscore_ops timer_syscore_ops = { 141 - .suspend = timer_suspend, 142 - .resume = timer_resume, 143 - }; 144 - 145 - static int __init timer_init_syscore_ops(void) 146 - { 147 - register_syscore_ops(&timer_syscore_ops); 148 - 149 - return 0; 150 - } 151 - 152 - device_initcall(timer_init_syscore_ops); 153 121 154 122 void __init time_init(void) 155 123 {