Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / drivers / net / tokenring / tmspci.c
index b68f195..7d3e270 100644 (file)
@@ -100,7 +100,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
        unsigned int pci_irq_line;
        unsigned long pci_ioaddr;
        struct card_info *cardinfo = &card_info_table[ent->driver_data];
-               
+
        if (versionprinted++ == 0)
                printk("%s", version);
 
@@ -122,7 +122,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
                goto err_out_trdev;
        }
 
-       ret = request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ,
+       ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED,
                          dev->name, dev);
        if (ret)
                goto err_out_region;
@@ -143,7 +143,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
                printk(":%2.2x", dev->dev_addr[i]);
        printk("\n");
                
-       ret = tmsdev_init(dev, PCI_MAX_ADDRESS, pdev);
+       ret = tmsdev_init(dev, &pdev->dev);
        if (ret) {
                printk("%s: unable to get memory for dev->priv.\n", dev->name);
                goto err_out_irq;
@@ -243,14 +243,7 @@ static struct pci_driver tms_pci_driver = {
 
 static int __init tms_pci_init (void)
 {
-       int rc = pci_register_driver (&tms_pci_driver);
-       if (rc < 0)
-               return rc;
-       if (rc == 0) {
-               pci_unregister_driver (&tms_pci_driver);
-               return -ENODEV;
-       }
-       return 0;
+       return pci_register_driver(&tms_pci_driver);
 }
 
 static void __exit tms_pci_rmmod (void)
@@ -261,14 +254,3 @@ static void __exit tms_pci_rmmod (void)
 module_init(tms_pci_init);
 module_exit(tms_pci_rmmod);
 
-\f
-/*
- * Local variables:
- *  compile-command: "gcc -DMODVERSIONS  -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -I/usr/src/linux/drivers/net/tokenring/ -c tmspci.c"
- *  alt-compile-command: "gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -I/usr/src/linux/drivers/net/tokenring/ -c tmspci.c"
- *  c-set-style "K&R"
- *  c-indent-level: 8
- *  c-basic-offset: 8
- *  tab-width: 8
- * End:
- */