From 6bb27d7349db51b50c40534710fe164ca0d58902 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 8 Nov 2012 12:40:59 -0700 Subject: ARM: delete struct sys_timer Now that the only field in struct sys_timer is .init, delete the struct, and replace the machine descriptor .timer field with the initialization function itself. This will enable moving timer drivers into drivers/clocksource without having to place a public prototype of each struct sys_timer object into include/linux; the intent is to create a single of_clocksource_init() function that determines which timer driver to initialize by scanning the device dtree, much like the proposed irqchip_init() at: http://www.spinics.net/lists/arm-kernel/msg203686.html Includes mach-omap2 fixes from Igor Grinberg. Tested-by: Robert Jarzmik Signed-off-by: Stephen Warren --- arch/arm/mach-u300/core.c | 2 +- arch/arm/mach-u300/timer.c | 10 +--------- arch/arm/mach-u300/timer.h | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) (limited to 'arch/arm/mach-u300') diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 4ce77cdc31cc..100a8b764dad 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -1780,7 +1780,7 @@ MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board") .nr_irqs = 0, .init_irq = u300_init_irq, .handle_irq = vic_handle_irq, - .timer = &u300_timer, + .init_time = u300_timer_init, .init_machine = u300_init_machine, .restart = u300_restart, MACHINE_END diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index 1da10e20e996..d9e73209c9b8 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c @@ -349,7 +349,7 @@ static u32 notrace u300_read_sched_clock(void) /* * This sets up the system timers, clock source and clock event. */ -static void __init u300_timer_init(void) +void __init u300_timer_init(void) { struct clk *clk; unsigned long rate; @@ -413,11 +413,3 @@ static void __init u300_timer_init(void) * used by hrtimers! */ } - -/* - * Very simple system timer that only register the clock event and - * clock source. - */ -struct sys_timer u300_timer = { - .init = u300_timer_init, -}; diff --git a/arch/arm/mach-u300/timer.h b/arch/arm/mach-u300/timer.h index b5e9791762e0..d34287bc34f5 100644 --- a/arch/arm/mach-u300/timer.h +++ b/arch/arm/mach-u300/timer.h @@ -1 +1 @@ -extern struct sys_timer u300_timer; +extern void u300_timer_init(void); -- cgit v1.2.3