[PATCH 5/8] LinuxPPS: pps_parport: Do not generate assert in case of lost signal.

From: Andrey Drobyshev
Date: Wed Feb 15 2017 - 09:33:03 EST


From: Alexander GQ Gerasiov <gq@xxxxxxxxx>

Since clear timeout is non-zero, some clear event capture is requested.
Therefore, if signal is lost we shouldn't generate assert event alone.

Signed-off-by: Alexander GQ Gerasiov <gq@xxxxxxxxx>
---
drivers/pps/clients/pps_parport.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/pps/clients/pps_parport.c b/drivers/pps/clients/pps_parport.c
index 83797d8..37094b0 100644
--- a/drivers/pps/clients/pps_parport.c
+++ b/drivers/pps/clients/pps_parport.c
@@ -96,7 +96,7 @@ static void parport_irq(void *handle)
if (!signal_is_set(port)) {
local_irq_restore(flags);
dev_err(dev->pps->dev, "lost the signal\n");
- goto out_assert;
+ goto out_none;
}

/* poll the port until the signal is unset */
@@ -118,6 +118,9 @@ static void parport_irq(void *handle)
dev->cw_err = 0;
}

+out_none:
+ return;
+
out_assert:
/* fire assert event */
pps_event(dev->pps, &ts_assert,
--
2.1.4