summaryrefslogtreecommitdiff
path: root/drivers/pps/clients/pps-ktimer.c
diff options
context:
space:
mode:
authorAlexander Gordeev <lasaine@lvk.cs.msu.su>2011-01-12 17:00:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 08:03:19 -0800
commit6f4229b51106cbc859e9d8209b22c8a2ec749e64 (patch)
tree346e08800b0f45330e99c9fae0255c73f1666835 /drivers/pps/clients/pps-ktimer.c
parent3003d55b59aa98aeaff2773df69732b27c0cbf6a (diff)
pps: unify timestamp gathering
Add a helper function to gather timestamps. This way clients don't have to duplicate it. 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/clients/pps-ktimer.c')
-rw-r--r--drivers/pps/clients/pps-ktimer.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/pps/clients/pps-ktimer.c b/drivers/pps/clients/pps-ktimer.c
index e7ef5b8186d0..e1bdd8bc8c9c 100644
--- a/drivers/pps/clients/pps-ktimer.c
+++ b/drivers/pps/clients/pps-ktimer.c
@@ -40,18 +40,13 @@ static struct timer_list ktimer;
static void pps_ktimer_event(unsigned long ptr)
{
- struct timespec __ts;
- struct pps_ktime ts;
+ struct pps_event_time ts;
/* First of all we get the time stamp... */
- getnstimeofday(&__ts);
+ pps_get_ts(&ts);
pr_info("PPS event at %lu\n", jiffies);
- /* ... and translate it to PPS time data struct */
- ts.sec = __ts.tv_sec;
- ts.nsec = __ts.tv_nsec;
-
pps_event(source, &ts, PPS_CAPTUREASSERT, NULL);
mod_timer(&ktimer, jiffies + HZ);