Skip to contentSkip to conversation

drivers/pci/: possible cleanups

PATCH New Adrian Bunk 1 participant 1 message Aug 14, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/pci/: possible cleanups

This patch contains the following possible cleanups:
- make the following needlessly global function static:
- pci.c: pci_restore_bars()
- #if 0 the following unused global functions:
- rom.c: pci_map_rom_copy()
- rom.c: pci_remove_rom()
- remove the following unused EXPORT_SYMBOL's:
- pci-acpi.c: pci_osc_support_set
- proc.c: pci_proc_detach_bus
- remove the following unused EXPORT_SYMBOL_GPL's:
- bus.c: pci_walk_bus
- probe.c: pci_create_bus
- setup-res.c: pci_claim_resource

---

This patch has been sent on:
- 13 Jul 2007

 drivers/pci/bus.c       |    1 -
 drivers/pci/pci-acpi.c  |    1 -
 drivers/pci/pci.c       |    3 +--
 drivers/pci/probe.c     |    1 -
 drivers/pci/proc.c      |    4 ----
 drivers/pci/rom.c       |    6 ++++--
 drivers/pci/setup-res.c |    1 -
 include/linux/pci.h     |    3 ---
 8 files changed, 5 insertions(+), 15 deletions(-)
include/linux/pci.h renamed from include/linux/pci.h.old +0 -3
@@ -562,14 +562,11 @@
 void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
 int __must_check pci_assign_resource(struct pci_dev *dev, int i);
 int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i);
-void pci_restore_bars(struct pci_dev *dev);
 int pci_select_bars(struct pci_dev *dev, unsigned long flags);
 
 /* ROM control related routines */
 void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
-void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size);
 void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom);
-void pci_remove_rom(struct pci_dev *pdev);
 
 /* Power management related routines */
 int pci_save_state(struct pci_dev *dev);
drivers/pci/bus.c renamed from drivers/pci/bus.c.old +0 -1
@@ -204,7 +204,6 @@
 	}
 	up_read(&pci_bus_sem);
 }
-EXPORT_SYMBOL_GPL(pci_walk_bus);
 
 EXPORT_SYMBOL(pci_bus_alloc_resource);
 EXPORT_SYMBOL_GPL(pci_bus_add_device);
drivers/pci/pci-acpi.c renamed from drivers/pci/pci-acpi.c.old +0 -1
@@ -188,7 +188,6 @@
 	}
 	return AE_OK;
 }
-EXPORT_SYMBOL(pci_osc_support_set);
 
 /**
  * pci_osc_control_set - commit requested control to Firmware
drivers/pci/pci.c renamed from drivers/pci/pci.c.old +1 -2
@@ -348,7 +348,7 @@
  * Restore the BAR values for a given device, so as to make it
  * accessible by its driver.
  */
-void
+static void
 pci_restore_bars(struct pci_dev *dev)
 {
 	int i, numres;
@@ -1612,7 +1612,6 @@
 
 device_initcall(pci_init);
 
-EXPORT_SYMBOL_GPL(pci_restore_bars);
 EXPORT_SYMBOL(pci_enable_device_bars);
 EXPORT_SYMBOL(pci_enable_device);
 EXPORT_SYMBOL(pcim_enable_device);
drivers/pci/probe.c renamed from drivers/pci/probe.c.old +0 -1
@@ -1205,7 +1205,6 @@
 	kfree(b);
 	return NULL;
 }
-EXPORT_SYMBOL_GPL(pci_create_bus);
 
 struct pci_bus *pci_scan_bus_parented(struct device *parent,
 		int bus, struct pci_ops *ops, void *sysdata)
drivers/pci/proc.c renamed from drivers/pci/proc.c.old +0 -4
@@ -479,7 +479,3 @@
 
 __initcall(pci_proc_init);
 
-#ifdef CONFIG_HOTPLUG
-EXPORT_SYMBOL(pci_proc_detach_bus);
-#endif
-
drivers/pci/rom.c renamed from drivers/pci/rom.c.old +4 -2
@@ -147,6 +147,7 @@
 	return rom;
 }
 
+#if 0
 /**
  * pci_map_rom_copy - map a PCI ROM to kernel space, create a copy
  * @pdev: pointer to pci device struct
@@ -181,6 +182,7 @@
 
 	return (void __iomem *)(unsigned long)res->start;
 }
+#endif  /*  0  */
 
 /**
  * pci_unmap_rom - unmap the ROM from kernel space
@@ -203,6 +205,7 @@
 		pci_disable_rom(pdev);
 }
 
+#if 0
 /**
  * pci_remove_rom - disable the ROM and remove its sysfs attribute
  * @pdev: pointer to pci device struct
@@ -221,6 +224,7 @@
 			    IORESOURCE_ROM_COPY)))
 		pci_disable_rom(pdev);
 }
+#endif  /*  0  */
 
 /**
  * pci_cleanup_rom - internal routine for freeing the ROM copy created
@@ -241,6 +245,4 @@
 }
 
 EXPORT_SYMBOL(pci_map_rom);
-EXPORT_SYMBOL(pci_map_rom_copy);
 EXPORT_SYMBOL(pci_unmap_rom);
-EXPORT_SYMBOL(pci_remove_rom);
drivers/pci/setup-res.c renamed from drivers/pci/setup-res.c.old +0 -1
@@ -125,7 +125,6 @@
 
 	return err;
 }
-EXPORT_SYMBOL_GPL(pci_claim_resource);
 
 int pci_assign_resource(struct pci_dev *dev, int resno)
 {