diff options
author | Alexander Gordeev <lasaine@lvk.cs.msu.su> | 2011-01-12 20:00:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:19 -0500 |
commit | 6f4229b51106cbc859e9d8209b22c8a2ec749e64 (patch) | |
tree | 346e08800b0f45330e99c9fae0255c73f1666835 /include/linux/serial_core.h | |
parent | 3003d55b59aa98aeaff2773df69732b27c0cbf6a (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 'include/linux/serial_core.h')
-rw-r--r-- | include/linux/serial_core.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index a23fa29d4eb0..758c5b0c6fd3 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -212,6 +212,7 @@ | |||
212 | #include <linux/tty.h> | 212 | #include <linux/tty.h> |
213 | #include <linux/mutex.h> | 213 | #include <linux/mutex.h> |
214 | #include <linux/sysrq.h> | 214 | #include <linux/sysrq.h> |
215 | #include <linux/pps_kernel.h> | ||
215 | 216 | ||
216 | struct uart_port; | 217 | struct uart_port; |
217 | struct serial_struct; | 218 | struct serial_struct; |
@@ -528,10 +529,10 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status) | |||
528 | struct uart_state *state = uport->state; | 529 | struct uart_state *state = uport->state; |
529 | struct tty_port *port = &state->port; | 530 | struct tty_port *port = &state->port; |
530 | struct tty_ldisc *ld = tty_ldisc_ref(port->tty); | 531 | struct tty_ldisc *ld = tty_ldisc_ref(port->tty); |
531 | struct timespec ts; | 532 | struct pps_event_time ts; |
532 | 533 | ||
533 | if (ld && ld->ops->dcd_change) | 534 | if (ld && ld->ops->dcd_change) |
534 | getnstimeofday(&ts); | 535 | pps_get_ts(&ts); |
535 | 536 | ||
536 | uport->icount.dcd++; | 537 | uport->icount.dcd++; |
537 | #ifdef CONFIG_HARD_PPS | 538 | #ifdef CONFIG_HARD_PPS |