Skip to content

Commit

Permalink
pps: timestamp is always passed to dcd_change()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ago authored and torvalds committed Jan 13, 2011
1 parent 818b9ee commit 12f9b1f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Documentation/serial/tty.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ write_wakeup() - May be called at any point between open and close.

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


Driver Access
Expand Down
8 changes: 0 additions & 8 deletions drivers/pps/clients/pps-ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ static void pps_tty_dcd_change(struct tty_struct *tty, unsigned int status,
struct pps_event_time *ts)
{
struct pps_device *pps = (struct pps_device *)tty->disc_data;
struct pps_event_time __ts;

/* First of all we get the time stamp... */
pps_get_ts(&__ts);

/* Does caller give us a timestamp? */
if (!ts) /* No. Do it ourself! */
ts = &__ts;

BUG_ON(pps == NULL);

Expand Down
2 changes: 1 addition & 1 deletion include/linux/tty_ldisc.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
* struct pps_event_time *ts)
*
* Tells the discipline that the DCD pin has changed its status and
* the relative timestamp. Pointer ts can be NULL.
* the relative timestamp. Pointer ts cannot be NULL.
*/

#include <linux/fs.h>
Expand Down

0 comments on commit 12f9b1f

Please sign in to comment.