summaryrefslogtreecommitdiff
path: root/drivers/clocksource/samsung_pwm_timer.c
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-04-23 17:46:28 +0200
committerOlof Johansson <olof@lixom.net>2013-04-28 12:16:57 -0700
commite9b852b8a7bc0217a03afff07fad34093e087542 (patch)
tree4f6b5d1fd95e329cfad5127e73649356209a67cc /drivers/clocksource/samsung_pwm_timer.c
parentf9bb48a2c25a96757d13795ba7cc52687f94446f (diff)
downloadlinux-next-e9b852b8a7bc0217a03afff07fad34093e087542.tar.gz
clocksource: samsung_pwm_timer: Use proper clockevents max_delta
This patch replaces hardcoded -1 argument passed to clockevents_config_and_register() with tcnt_max calculated based on variant data. This fixes invalid max delta configuration for 16-bit timers of s3c24xx. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/clocksource/samsung_pwm_timer.c')
-rw-r--r--drivers/clocksource/samsung_pwm_timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c
index 9f4bd6aa2343..cb866156b8b0 100644
--- a/drivers/clocksource/samsung_pwm_timer.c
+++ b/drivers/clocksource/samsung_pwm_timer.c
@@ -263,7 +263,8 @@ static void __init samsung_clockevent_init(void)
pwm.clock_count_per_tick = clock_rate / HZ;
time_event_device.cpumask = cpumask_of(0);
- clockevents_config_and_register(&time_event_device, clock_rate, 1, -1);
+ clockevents_config_and_register(&time_event_device,
+ clock_rate, 1, pwm.tcnt_max);
irq_number = pwm.irq[pwm.event_id];
setup_irq(irq_number, &samsung_clock_event_irq);