projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
627ee79
)
clockevents: Adjust timer interval when frequency changes
author
Soren Brinkmann
<
[email protected]
>
Mon, 3 Feb 2014 22:34:32 +0000
(14:34 -0800)
committer
Thomas Gleixner
<
[email protected]
>
Fri, 7 Feb 2014 14:34:29 +0000
(15:34 +0100)
clockevent devices in periodic mode are not updated when the frequency
of the device changes. Issue a dev->set_mode() callback which forces
the device to reevaluate the timer settings.
Signed-off-by: Soren Brinkmann <
[email protected]
>
Cc:
[email protected]
Cc: Daniel Lezcano <
[email protected]
>
Cc: Michal Simek <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Thomas Gleixner <
[email protected]
>
kernel/time/clockevents.c
patch
|
blob
|
history
diff --git
a/kernel/time/clockevents.c
b/kernel/time/clockevents.c
index 641d91003a45a424aa4586c54c7b9e96cf9ca57a..f85e5fda9c664854015a7e6257f7b6fa5889bb9d 100644
(file)
--- a/
kernel/time/clockevents.c
+++ b/
kernel/time/clockevents.c
@@
-443,10
+443,13
@@
int __clockevents_update_freq(struct clock_event_device *dev, u32 freq)
{
clockevents_config(dev, freq);
- if (dev->mode != CLOCK_EVT_MODE_ONESHOT)
- return 0;
+ if (dev->mode == CLOCK_EVT_MODE_ONESHOT)
+ return clockevents_program_event(dev, dev->next_event, false);
+
+ if (dev->mode == CLOCK_EVT_MODE_PERIODIC)
+ dev->set_mode(CLOCK_EVT_MODE_PERIODIC, dev);
- return
clockevents_program_event(dev, dev->next_event, false)
;
+ return
0
;
}
/**