diff --git a/drivers/pps/clients/pps-ldisc.c b/drivers/pps/clients/pps-ldisc.c index a94f73e1480d0e5b3c45eee167fdc95a3f1303c2..73bd3bb4d93b5945c89b49a7ed60ea49750da796 100644 --- a/drivers/pps/clients/pps-ldisc.c +++ b/drivers/pps/clients/pps-ldisc.c @@ -29,11 +29,14 @@ #define PPS_TTY_MAGIC 0x0001 -static void pps_tty_dcd_change(struct tty_struct *tty, unsigned int status, - struct pps_event_time *ts) +static void pps_tty_dcd_change(struct tty_struct *tty, unsigned int status) { - struct pps_device *pps = pps_lookup_dev(tty); + struct pps_device *pps; + struct pps_event_time ts; + + pps_get_ts(&ts); + pps = pps_lookup_dev(tty); /* * This should never fail, but the ldisc locking is very * convoluted, so don't crash just in case. @@ -42,7 +45,7 @@ static void pps_tty_dcd_change(struct tty_struct *tty, unsigned int status, return; /* Now do the PPS event report */ - pps_event(pps, ts, status ? PPS_CAPTUREASSERT : + pps_event(pps, &ts, status ? PPS_CAPTUREASSERT : PPS_CAPTURECLEAR, NULL); dev_dbg(pps->dev, "PPS %s at %lu\n", diff --git a/drivers/staging/dgrp/dgrp_net_ops.c b/drivers/staging/dgrp/dgrp_net_ops.c index 4c7abfabf19783a573896949df2e6b408eb3e3ab..e6018823b9deca9079ff3ee72251a5669ad99b2f 100644 --- a/drivers/staging/dgrp/dgrp_net_ops.c +++ b/drivers/staging/dgrp/dgrp_net_ops.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c index 51d3ed3dca277e2d0cb1cf5d63a19711d996d6a2..654f6010b473d7d93e817bf58cf7b9c4a2e0bd58 100644 --- a/drivers/staging/dgrp/dgrp_tty.c +++ b/drivers/staging/dgrp/dgrp_tty.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include diff --git a/drivers/staging/speakup/selection.c b/drivers/staging/speakup/selection.c index 0612df06a4bfd08d05499539d5adaa24853a51ad..2aa22379fda001721e3fd5f57e755b08e5b34771 100644 --- a/drivers/staging/speakup/selection.c +++ b/drivers/staging/speakup/selection.c @@ -2,6 +2,7 @@ #include #include #include +#include /* for dev_warn */ #include #include "speakup.h" diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 095072899b5edea12eee71da689367cce048e234..05e72bea9b07d87e31c69e291844428cb642d4be 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -49,6 +49,7 @@ #include #include #include +#include /* number of characters left in xmit buffer before select has we have room */ @@ -2188,7 +2189,7 @@ struct tty_ldisc_ops tty_ldisc_N_TTY = { * n_tty_inherit_ops - inherit N_TTY methods * @ops: struct tty_ldisc_ops where to save N_TTY methods * - * Used by a generic struct tty_ldisc_ops to easily inherit N_TTY + * Enables a 'subclass' line discipline to 'inherit' N_TTY * methods. */ diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index ca98a3f65fe1ffc77a8a26f886ffec1aa51e02c7..765be520cd2e57b672145485a0e4d21b5ac1f215 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2726,13 +2726,12 @@ void uart_handle_dcd_change(struct uart_port *uport, unsigned int status) struct uart_state *state = uport->state; struct tty_port *port = &state->port; struct tty_ldisc *ld = NULL; - struct pps_event_time ts; struct tty_struct *tty = port->tty; if (tty) ld = tty_ldisc_ref(tty); if (ld && ld->ops->dcd_change) - pps_get_ts(&ts); + ld->ops->dcd_change(tty, status); uport->icount.dcd++; #ifdef CONFIG_HARD_PPS @@ -2747,8 +2746,6 @@ void uart_handle_dcd_change(struct uart_port *uport, unsigned int status) tty_hangup(tty); } - if (ld && ld->ops->dcd_change) - ld->ops->dcd_change(tty, status, &ts); if (ld) tty_ldisc_deref(ld); } diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 61ec4ddf47e07f7d079e47c1a9f854a623198168..bb119934e76cd8c70bdde28038553b60867b3282 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -16,6 +16,7 @@ #include #include #include +#include /** * tty_buffer_free_all - free buffers used by a tty diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d97142159e0f0765a87de2b30d764c0b72228da3..87d4bbc773fc7d8d7223423c9d388accc32c527c 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -29,7 +29,6 @@ #include #include #include -#include #include struct uart_port; diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index fb79dd8d1537fd5e5ed06ac0ec813421e1298975..455a0d7bf2209665adc5c09bb8f4c2803edc3f49 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -100,16 +100,14 @@ * seek to perform this action quickly but should wait until * any pending driver I/O is completed. * - * void (*dcd_change)(struct tty_struct *tty, unsigned int status, - * struct pps_event_time *ts) + * void (*dcd_change)(struct tty_struct *tty, unsigned int status) * - * Tells the discipline that the DCD pin has changed its status and - * the relative timestamp. Pointer ts cannot be NULL. + * Tells the discipline that the DCD pin has changed its status. + * Used exclusively by the N_PPS (Pulse-Per-Second) line discipline. */ #include #include -#include #include struct tty_ldisc_ops { @@ -144,8 +142,7 @@ struct tty_ldisc_ops { void (*receive_buf)(struct tty_struct *, const unsigned char *cp, char *fp, int count); void (*write_wakeup)(struct tty_struct *); - void (*dcd_change)(struct tty_struct *, unsigned int, - struct pps_event_time *); + void (*dcd_change)(struct tty_struct *, unsigned int); struct module *owner;