diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2006-01-09 21:37:15 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 07:59:23 -0500 |
commit | ff5688ae1cedfb175b5ed0f319d03ad2e5ee005d (patch) | |
tree | eca0d41b3eefc833238591e0100a8136f21269a7 /drivers/net/tulip/pnic.c | |
parent | e03d72b99e4027504ada134bf1804d6ea792b206 (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/tulip/pnic.c')
-rw-r--r-- | drivers/net/tulip/pnic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/tulip/pnic.c b/drivers/net/tulip/pnic.c index d9980bde7508..ca7e53246adb 100644 --- a/drivers/net/tulip/pnic.c +++ b/drivers/net/tulip/pnic.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/jiffies.h> | ||
19 | #include "tulip.h" | 20 | #include "tulip.h" |
20 | 21 | ||
21 | 22 | ||
@@ -68,7 +69,7 @@ void pnic_lnk_change(struct net_device *dev, int csr5) | |||
68 | */ | 69 | */ |
69 | if (tulip_media_cap[dev->if_port] & MediaIsMII) | 70 | if (tulip_media_cap[dev->if_port] & MediaIsMII) |
70 | return; | 71 | return; |
71 | if (! tp->nwayset || jiffies - dev->trans_start > 1*HZ) { | 72 | if (! tp->nwayset || time_after(jiffies, dev->trans_start + 1*HZ)) { |
72 | tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff); | 73 | tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff); |
73 | iowrite32(tp->csr6, ioaddr + CSR6); | 74 | iowrite32(tp->csr6, ioaddr + CSR6); |
74 | iowrite32(0x30, ioaddr + CSR12); | 75 | iowrite32(0x30, ioaddr + CSR12); |