Skip to content

Commit 12f9b1f

Browse files
agotorvalds
authored andcommitted
pps: timestamp is always passed to dcd_change()
Remove the code that gatheres timestamp in pps_tty_dcd_change() in case passed ts parameter is NULL because it never happens in the current code. Fix comments as well. Signed-off-by: Alexander Gordeev <[email protected]> Acked-by: Rodolfo Giometti <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 818b9ee commit 12f9b1f

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

Documentation/serial/tty.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ write_wakeup() - May be called at any point between open and close.
107107

108108
dcd_change() - Report to the tty line the current DCD pin status
109109
changes and the relative timestamp. The timestamp
110-
can be NULL.
110+
cannot be NULL.
111111

112112

113113
Driver Access

drivers/pps/clients/pps-ldisc.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ static void pps_tty_dcd_change(struct tty_struct *tty, unsigned int status,
3232
struct pps_event_time *ts)
3333
{
3434
struct pps_device *pps = (struct pps_device *)tty->disc_data;
35-
struct pps_event_time __ts;
36-
37-
/* First of all we get the time stamp... */
38-
pps_get_ts(&__ts);
39-
40-
/* Does caller give us a timestamp? */
41-
if (!ts) /* No. Do it ourself! */
42-
ts = &__ts;
4335

4436
BUG_ON(pps == NULL);
4537

include/linux/tty_ldisc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
* struct pps_event_time *ts)
105105
*
106106
* Tells the discipline that the DCD pin has changed its status and
107-
* the relative timestamp. Pointer ts can be NULL.
107+
* the relative timestamp. Pointer ts cannot be NULL.
108108
*/
109109

110110
#include <linux/fs.h>

0 commit comments

Comments
 (0)