[PATCH] irq-flags: drivers/net: Use the new IRQF_ constants
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / drivers / net / pcnet32.c
index 9595f74da93f46d893d3b3e2950c0909c344443e..d768f3d1ac28e39c2688896016f173e3589e934b 100644 (file)
@@ -309,12 +309,6 @@ static int pcnet32_alloc_ring(struct net_device *dev, char *name);
 static void pcnet32_free_ring(struct net_device *dev);
 static void pcnet32_check_media(struct net_device *dev, int verbose);
 
-enum pci_flags_bit {
-       PCI_USES_IO = 1, PCI_USES_MEM = 2, PCI_USES_MASTER = 4,
-       PCI_ADDR0 = 0x10 << 0, PCI_ADDR1 = 0x10 << 1, PCI_ADDR2 =
-           0x10 << 2, PCI_ADDR3 = 0x10 << 3,
-};
-
 static u16 pcnet32_wio_read_csr(unsigned long addr, int index)
 {
        outw(index, addr + PCNET32_WIO_RAP);
@@ -1167,8 +1161,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
         * station address PROM at the base address and programmed into the
         * "Physical Address Registers" CSR12-14.
         * As a precautionary measure, we read the PROM values and complain if
-        * they disagree with the CSRs.  Either way, we use the CSR values, and
-        * double check that they are valid.
+        * they disagree with the CSRs.  If they miscompare, and the PROM addr
+        * is valid, then the PROM addr is used.
         */
        for (i = 0; i < 3; i++) {
                unsigned int val;
@@ -1547,7 +1541,7 @@ static int pcnet32_open(struct net_device *dev)
        unsigned long flags;
 
        if (request_irq(dev->irq, &pcnet32_interrupt,
-                       lp->shared_irq ? SA_SHIRQ : 0, dev->name,
+                       lp->shared_irq ? IRQF_SHARED : 0, dev->name,
                        (void *)dev)) {
                return -EAGAIN;
        }
@@ -1774,8 +1768,6 @@ static int pcnet32_open(struct net_device *dev)
                lp->rx_dma_addr[i] = 0;
        }
 
-       pcnet32_free_ring(dev);
-
        /*
         * Switch back to 16bit mode to avoid problems with dumb
         * DOS packet driver after a warm reboot