Commit e12cc603 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] PCI: remove CONFIG_PROC_FS checks in .c files.

parent e1a2f13e
...@@ -94,9 +94,7 @@ void __devinit pci_bus_add_devices(struct pci_bus *bus) ...@@ -94,9 +94,7 @@ void __devinit pci_bus_add_devices(struct pci_bus *bus)
device_add(&dev->dev); device_add(&dev->dev);
list_add_tail(&dev->global_list, &pci_devices); list_add_tail(&dev->global_list, &pci_devices);
#ifdef CONFIG_PROC_FS
pci_proc_attach_device(dev); pci_proc_attach_device(dev);
#endif
pci_create_sysfs_dev_files(dev); pci_create_sysfs_dev_files(dev);
} }
......
...@@ -190,9 +190,7 @@ int pci_remove_device_safe(struct pci_dev *dev) ...@@ -190,9 +190,7 @@ int pci_remove_device_safe(struct pci_dev *dev)
list_del(&dev->bus_list); list_del(&dev->bus_list);
list_del(&dev->global_list); list_del(&dev->global_list);
pci_free_resources(dev); pci_free_resources(dev);
#ifdef CONFIG_PROC_FS
pci_proc_detach_device(dev); pci_proc_detach_device(dev);
#endif
return 0; return 0;
} }
EXPORT_SYMBOL(pci_remove_device_safe); EXPORT_SYMBOL(pci_remove_device_safe);
...@@ -237,10 +235,7 @@ void pci_remove_bus_device(struct pci_dev *dev) ...@@ -237,10 +235,7 @@ void pci_remove_bus_device(struct pci_dev *dev)
struct pci_bus *b = dev->subordinate; struct pci_bus *b = dev->subordinate;
pci_remove_behind_bridge(dev); pci_remove_behind_bridge(dev);
#ifdef CONFIG_PROC_FS
pci_proc_detach_bus(b); pci_proc_detach_bus(b);
#endif
list_del(&b->node); list_del(&b->node);
kfree(b); kfree(b);
...@@ -251,10 +246,7 @@ void pci_remove_bus_device(struct pci_dev *dev) ...@@ -251,10 +246,7 @@ void pci_remove_bus_device(struct pci_dev *dev)
list_del(&dev->bus_list); list_del(&dev->bus_list);
list_del(&dev->global_list); list_del(&dev->global_list);
pci_free_resources(dev); pci_free_resources(dev);
#ifdef CONFIG_PROC_FS
pci_proc_detach_device(dev); pci_proc_detach_device(dev);
#endif
pci_put_dev(dev); pci_put_dev(dev);
} }
......
...@@ -398,9 +398,8 @@ static int cpci_configure_bridge(struct pci_bus* bus, struct pci_dev* dev) ...@@ -398,9 +398,8 @@ static int cpci_configure_bridge(struct pci_bus* bus, struct pci_dev* dev)
child = pci_find_bus(max + 1); child = pci_find_bus(max + 1);
if (!child) if (!child)
return -ENODEV; return -ENODEV;
#ifdef CONFIG_PROC_FS
pci_proc_attach_bus(child); pci_proc_attach_bus(child);
#endif
/* /*
* Update parent bridge's subordinate field if there were more bridges * Update parent bridge's subordinate field if there were more bridges
* behind the bridge that was scanned. * behind the bridge that was scanned.
......
...@@ -9,10 +9,18 @@ extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, ...@@ -9,10 +9,18 @@ extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
void (*alignf)(void *, struct resource *, void (*alignf)(void *, struct resource *,
unsigned long, unsigned long), unsigned long, unsigned long),
void *alignf_data); void *alignf_data);
/* PCI /proc functions */
#ifdef CONFIG_PROC_FS
extern int pci_proc_attach_device(struct pci_dev *dev); extern int pci_proc_attach_device(struct pci_dev *dev);
extern int pci_proc_detach_device(struct pci_dev *dev); extern int pci_proc_detach_device(struct pci_dev *dev);
extern int pci_proc_attach_bus(struct pci_bus *bus); extern int pci_proc_attach_bus(struct pci_bus *bus);
extern int pci_proc_detach_bus(struct pci_bus *bus); extern int pci_proc_detach_bus(struct pci_bus *bus);
#else
static inline int pci_proc_attach_device(struct pci_dev *dev) { return 0; }
static inline int pci_proc_detach_device(struct pci_dev *dev) { return 0; }
static inline int pci_proc_attach_bus(struct pci_bus *bus) { return 0; }
static inline int pci_proc_detach_bus(struct pci_bus *bus) { return 0; }
#endif
/* Functions for PCI Hotplug drivers to use */ /* Functions for PCI Hotplug drivers to use */
extern struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr); extern struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr);
......
...@@ -599,7 +599,6 @@ __initcall(pci_proc_init); ...@@ -599,7 +599,6 @@ __initcall(pci_proc_init);
#ifdef CONFIG_HOTPLUG #ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL(pci_proc_attach_device); EXPORT_SYMBOL(pci_proc_attach_device);
EXPORT_SYMBOL(pci_proc_detach_device);
EXPORT_SYMBOL(pci_proc_attach_bus); EXPORT_SYMBOL(pci_proc_attach_bus);
EXPORT_SYMBOL(pci_proc_detach_bus); EXPORT_SYMBOL(pci_proc_detach_bus);
EXPORT_SYMBOL(proc_bus_pci_dir); EXPORT_SYMBOL(proc_bus_pci_dir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment