[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1401041222-18992-1-git-send-email-manuel.schoelling@gmx.de>
Date: Sun, 25 May 2014 20:07:02 +0200
From: Manuel Schölling <manuel.schoelling@....de>
To: lidza.louina@...il.com
Cc: gregkh@...uxfoundation.org, driverdev-devel@...uxdriverproject.org,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Manuel Schölling <manuel.schoelling@....de>
Subject: [PATCH] dgnc: Use time_after_eq()
To be future-proof and for better readability the time comparisons are
modified to use time_after_eq() instead of plain, error-prone math.
Signed-off-by: Manuel Schölling <manuel.schoelling@....de>
---
drivers/staging/dgnc/dgnc_neo.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index cf22c7b..a8ca22a 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -395,7 +395,8 @@ static inline void neo_clear_break(struct channel_t *ch, int force)
/* Turn break off, and unset some variables */
if (ch->ch_flags & CH_BREAK_SENDING) {
- if ((jiffies >= ch->ch_stop_sending_break) || force) {
+ if (time_after_eq(jiffies, ch->ch_stop_sending_break)
+ || force) {
uchar temp = readb(&ch->ch_neo_uart->lcr);
writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr);
neo_pci_posting_flush(ch->ch_bd);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists