mtd/drivers/mtd/maps pci.c,1.10,1.11

gleixner at infradead.org gleixner at infradead.org
Fri May 20 12:29:08 EDT 2005


Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv23502

Modified Files:
	pci.c 
Log Message:
[PATCH] sort-out-pci_rom_address_enable-vs-ioresource_rom_enable.patch

From: Jon Smirl <jonsmirl at gmail.com>

This sorts out the usage of PCI_ROM_ADDRESS_ENABLE vs
IORESOURCE_ROM_ENABLE.  PCI_ROM_ADDRESS_ENABLE is for actually manipulating
the ROM's PCI config space.  IORESOURCE_ROM_ENABLE is for tracking the
IORESOURCE that the ROM is enabled.  Both are defined to 1 so code
shouldn't change.

Just to remind people, there are new PCI routines for enable/disable ROMs
so please call them instead of directly coding access in device drivers.
There are ten or so drivers that need to be converted to the new API.

Signed-off-by: Jon Smirl <jonsmirl at gmail.com>
Signed-off-by: Andrew Morton <akpm at osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>



Index: pci.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/pci.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- pci.c	18 Mar 2005 14:04:35 -0000	1.10
+++ pci.c	20 May 2005 16:29:05 -0000	1.11
@@ -205,9 +205,9 @@
 		 * or simply enabling it?
 		 */
 		if (!(pci_resource_flags(dev, PCI_ROM_RESOURCE) &
-		     PCI_ROM_ADDRESS_ENABLE)) {
+				    IORESOURCE_ROM_ENABLE)) {
 		     	u32 val;
-			pci_resource_flags(dev, PCI_ROM_RESOURCE) |= PCI_ROM_ADDRESS_ENABLE;
+			pci_resource_flags(dev, PCI_ROM_RESOURCE) |= IORESOURCE_ROM_ENABLE;
 			pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val);
 			val |= PCI_ROM_ADDRESS_ENABLE;
 			pci_write_config_dword(dev, PCI_ROM_ADDRESS, val);
@@ -241,7 +241,7 @@
 	/*
 	 * We need to undo the PCI BAR2/PCI ROM BAR address alteration.
 	 */
-	pci_resource_flags(dev, PCI_ROM_RESOURCE) &= ~PCI_ROM_ADDRESS_ENABLE;
+	pci_resource_flags(dev, PCI_ROM_RESOURCE) &= ~IORESOURCE_ROM_ENABLE;
 	pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val);
 	val &= ~PCI_ROM_ADDRESS_ENABLE;
 	pci_write_config_dword(dev, PCI_ROM_ADDRESS, val);





More information about the linux-mtd-cvs mailing list