Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 656c669b authored by Stephen Warren's avatar Stephen Warren
Browse files

ARM: samsung: register syscore_ops for timer resume directly



Instead of using struct sys_timer's resume function, register syscore_ops
directly in s3c2410_timer_init(). This will allow the sys_timer suspend/
resume fields to be removed, and eventually lead to a complete removal of
struct sys_timer.

Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent 8726e96f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/syscore_ops.h>

#include <asm/mach-types.h>

@@ -271,6 +272,10 @@ static void __init s3c2410_timer_resources(void)
	clk_enable(tin);
}

static struct syscore_ops s3c24xx_syscore_ops = {
	.resume		= s3c2410_timer_setup,
};

static void __init s3c2410_timer_init(void)
{
	arch_gettimeoffset = s3c2410_gettimeoffset;
@@ -278,9 +283,9 @@ static void __init s3c2410_timer_init(void)
	s3c2410_timer_resources();
	s3c2410_timer_setup();
	setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
	register_syscore_ops(&s3c24xx_syscore_ops);
}

struct sys_timer s3c24xx_timer = {
	.init		= s3c2410_timer_init,
	.resume		= s3c2410_timer_setup
};