linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / net / tokenring / olympic.c
index 8583148..05477d2 100644 (file)
@@ -80,6 +80,7 @@
 #define OLYMPIC_DEBUG 0
 
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
 #include <linux/bitops.h>
-#include <linux/jiffies.h>
 
 #include <net/checksum.h>
 
@@ -216,7 +216,7 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device
        dev = alloc_trdev(sizeof(struct olympic_private)) ; 
        if (!dev) {
                i = -ENOMEM; 
-               goto op_release_dev;
+               goto op_free_dev;
        }
 
        olympic_priv = dev->priv ;
@@ -281,8 +281,8 @@ op_free_iomap:
        if (olympic_priv->olympic_lap)
                iounmap(olympic_priv->olympic_lap);
 
+op_free_dev:
        free_netdev(dev);
-op_release_dev:
        pci_release_regions(pdev); 
 
 op_disable_dev:
@@ -307,7 +307,7 @@ static int __devinit olympic_init(struct net_device *dev)
        t=jiffies;
        while((readl(olympic_mmio+BCTL)) & BCTL_SOFTRESET) {
                schedule();             
-               if(time_after(jiffies, t + 40*HZ)) {
+               if(jiffies-t > 40*HZ) {
                        printk(KERN_ERR "IBM PCI tokenring card not responding.\n");
                        return -ENODEV;
                }
@@ -359,7 +359,7 @@ static int __devinit olympic_init(struct net_device *dev)
                t=jiffies;
                while (!readl(olympic_mmio+CLKCTL) & CLKCTL_PAUSE) { 
                        schedule() ; 
-                       if(time_after(jiffies, t + 2*HZ)) {
+                       if(jiffies-t > 2*HZ) { 
                                printk(KERN_ERR "IBM Cardbus tokenring adapter not responsing.\n") ; 
                                return -ENODEV;
                        }
@@ -373,7 +373,7 @@ static int __devinit olympic_init(struct net_device *dev)
        t=jiffies;
        while(!((readl(olympic_mmio+SISR_RR)) & SISR_SRB_REPLY)) {
                schedule();             
-               if(time_after(jiffies, t + 15*HZ)) {
+               if(jiffies-t > 15*HZ) {
                        printk(KERN_ERR "IBM PCI tokenring card not responding.\n");
                        return -ENODEV;
                }
@@ -445,7 +445,7 @@ static int olympic_open(struct net_device *dev)
 
        olympic_init(dev);
 
-       if(request_irq(dev->irq, &olympic_interrupt, IRQF_SHARED , "olympic", dev)) {
+       if(request_irq(dev->irq, &olympic_interrupt, SA_SHIRQ , "olympic", dev)) {
                return -EAGAIN;
        }
 
@@ -519,7 +519,7 @@ static int olympic_open(struct net_device *dev)
                                olympic_priv->srb_queued=0;
                                break;
                        }
-                       if (time_after(jiffies, t + 10*HZ)) {
+                       if ((jiffies-t) > 10*HZ) { 
                                printk(KERN_WARNING "%s: SRB timed out. \n",dev->name) ; 
                                olympic_priv->srb_queued=0;
                                break ;