diff options
author | Alexander Gordeev <lasaine@lvk.cs.msu.su> | 2011-01-12 20:00:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:21 -0500 |
commit | 717c033669ed3ceaee8df57d4562fafcc1a6267a (patch) | |
tree | 892e922c08b5f5eee8fbe7c8e0fdc774db660c67 /drivers/pps/kapi.c | |
parent | e2c18e49a0d4f822ffc29fb4958943beb1ff08b7 (diff) |
pps: add kernel consumer support
Add an optional feature of PPSAPI, kernel consumer support, which uses the
added hardpps() function.
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Acked-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pps/kapi.c')
-rw-r--r-- | drivers/pps/kapi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c index ebf33746c37c..cba1b43f7519 100644 --- a/drivers/pps/kapi.c +++ b/drivers/pps/kapi.c | |||
@@ -26,11 +26,14 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/time.h> | 28 | #include <linux/time.h> |
29 | #include <linux/timex.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
31 | #include <linux/pps_kernel.h> | 32 | #include <linux/pps_kernel.h> |
32 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
33 | 34 | ||
35 | #include "kc.h" | ||
36 | |||
34 | /* | 37 | /* |
35 | * Local functions | 38 | * Local functions |
36 | */ | 39 | */ |
@@ -139,6 +142,7 @@ EXPORT_SYMBOL(pps_register_source); | |||
139 | 142 | ||
140 | void pps_unregister_source(struct pps_device *pps) | 143 | void pps_unregister_source(struct pps_device *pps) |
141 | { | 144 | { |
145 | pps_kc_remove(pps); | ||
142 | pps_unregister_cdev(pps); | 146 | pps_unregister_cdev(pps); |
143 | 147 | ||
144 | /* don't have to kfree(pps) here because it will be done on | 148 | /* don't have to kfree(pps) here because it will be done on |
@@ -211,6 +215,8 @@ void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event, | |||
211 | captured = ~0; | 215 | captured = ~0; |
212 | } | 216 | } |
213 | 217 | ||
218 | pps_kc_event(pps, ts, event); | ||
219 | |||
214 | /* Wake up if captured something */ | 220 | /* Wake up if captured something */ |
215 | if (captured) { | 221 | if (captured) { |
216 | pps->last_ev++; | 222 | pps->last_ev++; |