Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374227
b: refs/heads/master
c: 81d4f7b
h: refs/heads/master
i:
  374225: ba59960
  374223: 7d234c2
v: v3
  • Loading branch information
Tomasz Figa authored and Olof Johansson committed Apr 28, 2013
1 parent 0ff5a64 commit 3a63685
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6fe4dfd041dadbc1cc2460ed8680f2734dc3dc95
refs/heads/master: 81d4f7bfdc9417e7d8fc1133c762daa4458eec5e
13 changes: 13 additions & 0 deletions trunk/drivers/clocksource/samsung_pwm_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,19 @@ static void samsung_time_start(unsigned int channel, bool periodic)
static int samsung_set_next_event(unsigned long cycles,
struct clock_event_device *evt)
{
/*
* This check is needed to account for internal rounding
* errors inside clockevents core, which might result in
* passing cycles = 0, which in turn would not generate any
* timer interrupt and hang the system.
*
* Another solution would be to set up the clockevent device
* with min_delta = 2, but this would unnecessarily increase
* the minimum sleep period.
*/
if (!cycles)
cycles = 1;

samsung_time_setup(pwm.event_id, cycles);
samsung_time_start(pwm.event_id, false);

Expand Down

0 comments on commit 3a63685

Please sign in to comment.