Export the ROM enable/disable helpers

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Sep 26 21:59:01 EDT 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=e416de5e61e1a9b7f987804cbb67230b5f5293c6
Commit:     e416de5e61e1a9b7f987804cbb67230b5f5293c6
Parent:     3afe7eb37f4d47f31d30a81c1b42ca02eab01e44
Author:     Alan Cox <alan at lxorguk.ukuu.org.uk>
AuthorDate: Tue Sep 23 17:25:10 2008 +0100
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Sep 26 18:59:05 2008 -0600

    Export the ROM enable/disable helpers
    
    .... so that they can be used by MTD map drivers. Lets us close #9420
    
    Signed-off-by: Alan Cox <alan at redhat.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/pci/rom.c   |    6 ++++--
 include/linux/pci.h |    2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
index bd5c0e0..1f5f614 100644
--- a/drivers/pci/rom.c
+++ b/drivers/pci/rom.c
@@ -21,7 +21,7 @@
  * between the ROM and other resources, so enabling it may disable access
  * to MMIO registers or other card memory.
  */
-static int pci_enable_rom(struct pci_dev *pdev)
+int pci_enable_rom(struct pci_dev *pdev)
 {
 	struct resource *res = pdev->resource + PCI_ROM_RESOURCE;
 	struct pci_bus_region region;
@@ -45,7 +45,7 @@ static int pci_enable_rom(struct pci_dev *pdev)
  * Disable ROM decoding on a PCI device by turning off the last bit in the
  * ROM BAR.
  */
-static void pci_disable_rom(struct pci_dev *pdev)
+void pci_disable_rom(struct pci_dev *pdev)
 {
 	u32 rom_addr;
 	pci_read_config_dword(pdev, pdev->rom_base_reg, &rom_addr);
@@ -260,3 +260,5 @@ void pci_cleanup_rom(struct pci_dev *pdev)
 
 EXPORT_SYMBOL(pci_map_rom);
 EXPORT_SYMBOL(pci_unmap_rom);
+EXPORT_SYMBOL_GPL(pci_enable_rom);
+EXPORT_SYMBOL_GPL(pci_disable_rom);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c0e1400..7a4cee0 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -631,6 +631,8 @@ int __must_check pci_assign_resource(struct pci_dev *dev, int i);
 int pci_select_bars(struct pci_dev *dev, unsigned long flags);
 
 /* ROM control related routines */
+int pci_enable_rom(struct pci_dev *pdev);
+void pci_disable_rom(struct pci_dev *pdev);
 void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
 void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom);
 size_t pci_get_rom_size(void __iomem *rom, size_t size);



More information about the linux-mtd-cvs mailing list