summaryrefslogtreecommitdiffstats
path: root/drivers/pps/kapi.c
diff options
context:
space:
mode:
authorAlexander Gordeev <lasaine@lvk.cs.msu.su>2011-01-12 17:00:58 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 08:03:21 -0800
commit717c033669ed3ceaee8df57d4562fafcc1a6267a (patch)
tree892e922c08b5f5eee8fbe7c8e0fdc774db660c67 /drivers/pps/kapi.c
parente2c18e49a0d4f822ffc29fb4958943beb1ff08b7 (diff)
downloadop-kernel-dev-717c033669ed3ceaee8df57d4562fafcc1a6267a.zip
op-kernel-dev-717c033669ed3ceaee8df57d4562fafcc1a6267a.tar.gz
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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c
index ebf3374..cba1b43 100644
--- a/drivers/pps/kapi.c
+++ b/drivers/pps/kapi.c
@@ -26,11 +26,14 @@
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/time.h>
+#include <linux/timex.h>
#include <linux/spinlock.h>
#include <linux/fs.h>
#include <linux/pps_kernel.h>
#include <linux/slab.h>
+#include "kc.h"
+
/*
* Local functions
*/
@@ -139,6 +142,7 @@ EXPORT_SYMBOL(pps_register_source);
void pps_unregister_source(struct pps_device *pps)
{
+ pps_kc_remove(pps);
pps_unregister_cdev(pps);
/* 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,
captured = ~0;
}
+ pps_kc_event(pps, ts, event);
+
/* Wake up if captured something */
if (captured) {
pps->last_ev++;
OpenPOWER on IntegriCloud