patch-2.4.0-test9 linux/drivers/char/serial.c

Next file: linux/drivers/char/serial_amba.c
Previous file: linux/drivers/char/sbc60xxwdt.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test8/linux/drivers/char/serial.c linux/drivers/char/serial.c
@@ -331,6 +331,10 @@
 #define IS_PCI_REGION_IOPORT(dev, r) (pci_resource_flags((dev), (r)) & \
 				      IORESOURCE_IO)
 #endif
+#ifndef IS_PCI_REGION_IOMEM
+#define IS_PCI_REGION_IOMEM(dev, r) (pci_resource_flags((dev), (r)) & \
+				      IORESOURCE_MEM)
+#endif
 #ifndef PCI_IRQ_RESOURCE
 #define PCI_IRQ_RESOURCE(dev, r) ((dev)->irq_resource[r].start)
 #endif
@@ -4185,7 +4189,7 @@
  * This is the configuration table for all of the PCI serial boards
  * which we support.
  */
-static struct pci_board pci_boards[] __initdata = {
+static struct pci_board pci_boards[] __devinitdata = {
 	/*
 	 * Vendor ID, 	Device ID,
 	 * Subvendor ID,	Subdevice ID,
@@ -4606,9 +4610,9 @@
 			num_port++;
 			if (first_port == -1)
 				first_port = i;
-		} else {
-			num_iomem++;
 		}
+		if (IS_PCI_REGION_IOMEM(dev, i))
+			num_iomem++;
 	}
 
 	/*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)