pps: timestamp is always passed to dcd_change()
authorAlexander Gordeev <lasaine@lvk.cs.msu.su>
Thu, 13 Jan 2011 01:00:55 +0000 (17:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 16:03:20 +0000 (08:03 -0800)
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 <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>
Documentation/serial/tty.txt
drivers/pps/clients/pps-ldisc.c
include/linux/tty_ldisc.h

index 7c900507279f97ad6e7da100082f44feefb53992..540db41dfd5d7bdd0c3af757b34046e3e4617ea9 100644 (file)
@@ -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
index 1b3c6eda12ba85cb0b4b939c978d3b361dce612e..79451f2dea6a59a3fe11d1ee55bd5cf2466fa7d3 100644 (file)
@@ -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);
 
index 763e061e19f14d6cc05c7b19437cc2536f0a78d7..ff7dc08696a8cc67c812ea516e9bcd9fee9c53c7 100644 (file)
  *                     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>