aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/baycom_epp.c
diff options
context:
space:
mode:
authorMarcelo Feitoza Parisi <marcelo@feitoza.com.br>2006-01-09 21:37:15 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:59:23 -0500
commitff5688ae1cedfb175b5ed0f319d03ad2e5ee005d (patch)
treeeca0d41b3eefc833238591e0100a8136f21269a7 /drivers/net/hamradio/baycom_epp.c
parente03d72b99e4027504ada134bf1804d6ea792b206 (diff)
[PATCH] drivers/net/*: use time_after() and friends
They deal with wrapping correctly and are nicer to read. Also make jiffies-holding variables unsigned long. Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/hamradio/baycom_epp.c')
-rw-r--r--drivers/net/hamradio/baycom_epp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index e4188d082f01..9220de9f4fe7 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -905,7 +905,7 @@ static int epp_open(struct net_device *dev)
905 /* autoprobe baud rate */ 905 /* autoprobe baud rate */
906 tstart = jiffies; 906 tstart = jiffies;
907 i = 0; 907 i = 0;
908 while ((signed)(jiffies-tstart-HZ/3) < 0) { 908 while (time_before(jiffies, tstart + HZ/3)) {
909 if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1) 909 if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1)
910 goto epptimeout; 910 goto epptimeout;
911 if ((stat & (EPP_NRAEF|EPP_NRHF)) == EPP_NRHF) { 911 if ((stat & (EPP_NRAEF|EPP_NRHF)) == EPP_NRHF) {