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>
This commit is contained in:
committed by
Linus Torvalds
parent
e2c18e49a0
commit
717c033669
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user