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 / dgrs.c
index 91d32f7..fa4f094 100644 (file)
@@ -454,7 +454,7 @@ do_plx_dma(
  *     up some state variables to let the host CPU continue doing
  *     other things until a DMA completion interrupt comes along.
  */
-void
+static void
 dgrs_rcv_frame(
        struct net_device       *dev0,
        DGRS_PRIV       *priv0,
@@ -993,7 +993,7 @@ dgrs_download(struct net_device *dev0)
        int             is;
        unsigned long   i;
 
-       static int      iv2is[16] = {
+       static const int iv2is[16] = {
                                0, 0, 0, ES4H_IS_INT3,
                                0, ES4H_IS_INT5, 0, ES4H_IS_INT7,
                                0, 0, ES4H_IS_INT10, ES4H_IS_INT11,
@@ -1150,7 +1150,7 @@ dgrs_download(struct net_device *dev0)
 /*
  *     Probe (init) a board
  */
-int __init 
+static int __init 
 dgrs_probe1(struct net_device *dev)
 {
        DGRS_PRIV       *priv = (DGRS_PRIV *) dev->priv;
@@ -1191,7 +1191,7 @@ dgrs_probe1(struct net_device *dev)
        if (priv->plxreg)
                OUTL(dev->base_addr + PLX_LCL2PCI_DOORBELL, 1);
        
-       rc = request_irq(dev->irq, &dgrs_intr, SA_SHIRQ, "RightSwitch", dev);
+       rc = request_irq(dev->irq, &dgrs_intr, IRQF_SHARED, "RightSwitch", dev);
        if (rc)
                goto err_out;
 
@@ -1228,7 +1228,7 @@ err_out:
                return rc;
 }
 
-int __init 
+static int __init 
 dgrs_initclone(struct net_device *dev)
 {
        DGRS_PRIV       *priv = (DGRS_PRIV *) dev->priv;
@@ -1458,6 +1458,8 @@ static struct pci_driver dgrs_pci_driver = {
        .probe = dgrs_pci_probe,
        .remove = __devexit_p(dgrs_pci_remove),
 };
+#else
+static struct pci_driver dgrs_pci_driver = {};
 #endif
 
 
@@ -1549,7 +1551,7 @@ MODULE_PARM_DESC(nicmode, "Digi RightSwitch operating mode (1: switch, 2: multi-
 static int __init dgrs_init_module (void)
 {
        int     i;
-       int eisacount = 0, pcicount = 0;
+       int     err;
 
        /*
         *      Command line variable overrides
@@ -1591,15 +1593,13 @@ static int __init dgrs_init_module (void)
         *      Find and configure all the cards
         */
 #ifdef CONFIG_EISA
-       eisacount = eisa_driver_register(&dgrs_eisa_driver);
-       if (eisacount < 0)
-               return eisacount;
-#endif
-#ifdef CONFIG_PCI
-       pcicount = pci_register_driver(&dgrs_pci_driver);
-       if (pcicount)
-               return pcicount;
+       err = eisa_driver_register(&dgrs_eisa_driver);
+       if (err)
+               return err;
 #endif
+       err = pci_register_driver(&dgrs_pci_driver);
+       if (err)
+               return err;
        return 0;
 }