From: Alexander Gordeev <lasaine@lvk.cs.msu.su>
To: linux-kernel@vger.kernel.org
Cc: "Nikita V\. Youshchenko" <yoush@cs.msu.su>,
linuxpps@ml.enneenne.com,
Rodolfo Giometti <giometti@enneenne.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexander Gordeev <lasaine@lvk.cs.msu.su>,
Randy Dunlap <rdunlap@xenotime.net>,
linux-doc@vger.kernel.org
Subject: [PATCHv6 11/16] pps: timestamp is always passed to dcd_change()
Date: Fri, 17 Dec 2010 22:54:35 +0300 [thread overview]
Message-ID: <d24554c00a8c24b4e3754efb5bccfa27950e1afa.1292604060.git.lasaine@lvk.cs.msu.su> (raw)
In-Reply-To: <cover.1292604060.git.lasaine@lvk.cs.msu.su>
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.
Acked-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
---
Documentation/serial/tty.txt | 2 +-
drivers/pps/clients/pps-ldisc.c | 8 --------
include/linux/tty_ldisc.h | 2 +-
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt
index 7c90050..540db41 100644
--- a/Documentation/serial/tty.txt
+++ b/Documentation/serial/tty.txt
@@ -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
diff --git a/drivers/pps/clients/pps-ldisc.c b/drivers/pps/clients/pps-ldisc.c
index 1b3c6ed..79451f2 100644
--- a/drivers/pps/clients/pps-ldisc.c
+++ b/drivers/pps/clients/pps-ldisc.c
@@ -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);
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index 763e061..ff7dc08 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -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>
--
1.7.2.3
next prev parent reply other threads:[~2010-12-17 19:55 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 19:54 [PATCHv6 00/16] pps: several fixes and improvements Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 01/16] pps: trivial fixes Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 02/16] pps: declare variables where they are used in switch Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 03/16] pps: fix race in PPS_FETCH handler Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 04/16] pps: unify timestamp gathering Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 05/16] pps: access pps device by direct pointer Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 06/16] pps: convert printk/pr_* to dev_* Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 07/16] pps: move idr stuff to pps.c Alexander Gordeev
2010-12-18 0:13 ` Andrew Morton
2010-12-18 1:07 ` Alexander Gordeev
2010-12-18 1:18 ` Andrew Morton
2010-12-17 19:54 ` [PATCHv6 08/16] pps: do not disable interrupts for idr operations Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 09/16] pps: use BUG_ON for kernel API safety checks Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 10/16] pps: simplify conditions a bit Alexander Gordeev
2010-12-17 19:54 ` Alexander Gordeev [this message]
2010-12-17 19:54 ` [PATCHv6 12/16] ntp: add hardpps implementation Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 13/16] pps: capture MONOTONIC_RAW timestamps as well Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 14/16] pps: add kernel consumer support Alexander Gordeev
2010-12-17 19:54 ` [PATCHv6 15/16] pps: add parallel port PPS client Alexander Gordeev
2010-12-18 0:17 ` Andrew Morton
2010-12-18 0:50 ` Alexander Gordeev
2010-12-18 1:13 ` Andrew Morton
2010-12-17 19:54 ` [PATCHv6 16/16] pps: add parallel port PPS signal generator Alexander Gordeev
2010-12-18 0:18 ` Andrew Morton
2010-12-18 0:52 ` Alexander Gordeev
2010-12-18 0:19 ` [PATCHv6 00/16] pps: several fixes and improvements Andrew Morton
2010-12-18 1:00 ` Alexander Gordeev
2010-12-18 1:14 ` Andrew Morton
2010-12-20 11:54 ` [PATCHv7 00/16] changed some patches Alexander Gordeev
2010-12-20 11:54 ` [PATCHv7 08/16] pps: make idr lock a mutex and protect idr_pre_get Alexander Gordeev
2010-12-20 11:54 ` [PATCHv7 12/16] ntp: add hardpps implementation Alexander Gordeev
2010-12-20 11:54 ` [PATCHv7 13/16] pps: capture MONOTONIC_RAW timestamps as well Alexander Gordeev
2010-12-20 11:54 ` [PATCHv7 14/16] pps: add kernel consumer support Alexander Gordeev
2010-12-20 11:54 ` [PATCHv7 15/16] pps: add parallel port PPS client Alexander Gordeev
2010-12-20 11:54 ` [PATCHv7 16/16] pps: add parallel port PPS signal generator Alexander Gordeev
2010-12-24 0:35 ` Andrew Morton
2010-12-24 1:37 ` Alexander Gordeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d24554c00a8c24b4e3754efb5bccfa27950e1afa.1292604060.git.lasaine@lvk.cs.msu.su \
--to=lasaine@lvk.cs.msu.su \
--cc=akpm@linux-foundation.org \
--cc=giometti@enneenne.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxpps@ml.enneenne.com \
--cc=rdunlap@xenotime.net \
--cc=yoush@cs.msu.su \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®