net: spread __net_init, __net_exit
[safe/jmp/linux-2.6] / drivers / net / pasemi_mac.c
index 6ea4539..d44d4a2 100644 (file)
@@ -1216,7 +1216,7 @@ static int pasemi_mac_open(struct net_device *dev)
        snprintf(mac->tx_irq_name, sizeof(mac->tx_irq_name), "%s tx",
                 dev->name);
 
-       ret = request_irq(mac->tx->chan.irq, &pasemi_mac_tx_intr, IRQF_DISABLED,
+       ret = request_irq(mac->tx->chan.irq, pasemi_mac_tx_intr, IRQF_DISABLED,
                          mac->tx_irq_name, mac->tx);
        if (ret) {
                dev_err(&mac->pdev->dev, "request_irq of irq %d failed: %d\n",
@@ -1227,7 +1227,7 @@ static int pasemi_mac_open(struct net_device *dev)
        snprintf(mac->rx_irq_name, sizeof(mac->rx_irq_name), "%s rx",
                 dev->name);
 
-       ret = request_irq(mac->rx->chan.irq, &pasemi_mac_rx_intr, IRQF_DISABLED,
+       ret = request_irq(mac->rx->chan.irq, pasemi_mac_rx_intr, IRQF_DISABLED,
                          mac->rx_irq_name, mac->rx);
        if (ret) {
                dev_err(&mac->pdev->dev, "request_irq of irq %d failed: %d\n",
@@ -1733,7 +1733,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        struct net_device *dev;
        struct pasemi_mac *mac;
-       int err;
+       int err, ret;
 
        err = pci_enable_device(pdev);
        if (err)
@@ -1791,12 +1791,13 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
        memcpy(dev->dev_addr, mac->mac_addr, sizeof(mac->mac_addr));
 
-       mac->dma_if = mac_to_intf(mac);
-       if (mac->dma_if < 0) {
+       ret = mac_to_intf(mac);
+       if (ret < 0) {
                dev_err(&mac->pdev->dev, "Can't map DMA interface\n");
                err = -ENODEV;
                goto out;
        }
+       mac->dma_if = ret;
 
        switch (pdev->device) {
        case 0xa005:
@@ -1874,7 +1875,7 @@ static void __devexit pasemi_mac_remove(struct pci_dev *pdev)
        free_netdev(netdev);
 }
 
-static struct pci_device_id pasemi_mac_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(pasemi_mac_pci_tbl) = {
        { PCI_DEVICE(PCI_VENDOR_ID_PASEMI, 0xa005) },
        { PCI_DEVICE(PCI_VENDOR_ID_PASEMI, 0xa006) },
        { },