summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-06-03 09:33:47 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-06-03 09:33:47 -0700
commite12cc603e62f9af30238fa656ecb552af8893af9 (patch)
tree45ecaac5939230d4adad3f061c20363ea4da9c7f
parente1a2f13ec577a24d9b2b6c2f42235c7602f71e19 (diff)
[PATCH] PCI: remove CONFIG_PROC_FS checks in .c files.
-rw-r--r--drivers/pci/bus.c2
-rw-r--r--drivers/pci/hotplug.c8
-rw-r--r--drivers/pci/hotplug/cpci_hotplug_pci.c3
-rw-r--r--drivers/pci/pci.h8
-rw-r--r--drivers/pci/proc.c1
5 files changed, 9 insertions, 13 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index dda1e005bb08..035dcbcb970b 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -94,9 +94,7 @@ void __devinit pci_bus_add_devices(struct pci_bus *bus)
device_add(&dev->dev);
list_add_tail(&dev->global_list, &pci_devices);
-#ifdef CONFIG_PROC_FS
pci_proc_attach_device(dev);
-#endif
pci_create_sysfs_dev_files(dev);
}
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
index b277d5705690..e943e451acb7 100644
--- a/drivers/pci/hotplug.c
+++ b/drivers/pci/hotplug.c
@@ -190,9 +190,7 @@ int pci_remove_device_safe(struct pci_dev *dev)
list_del(&dev->bus_list);
list_del(&dev->global_list);
pci_free_resources(dev);
-#ifdef CONFIG_PROC_FS
pci_proc_detach_device(dev);
-#endif
return 0;
}
EXPORT_SYMBOL(pci_remove_device_safe);
@@ -237,10 +235,7 @@ void pci_remove_bus_device(struct pci_dev *dev)
struct pci_bus *b = dev->subordinate;
pci_remove_behind_bridge(dev);
-
-#ifdef CONFIG_PROC_FS
pci_proc_detach_bus(b);
-#endif
list_del(&b->node);
kfree(b);
@@ -251,10 +246,7 @@ void pci_remove_bus_device(struct pci_dev *dev)
list_del(&dev->bus_list);
list_del(&dev->global_list);
pci_free_resources(dev);
-#ifdef CONFIG_PROC_FS
pci_proc_detach_device(dev);
-#endif
-
pci_put_dev(dev);
}
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
index 9834f9357520..8ffe245a1ca2 100644
--- a/drivers/pci/hotplug/cpci_hotplug_pci.c
+++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
@@ -398,9 +398,8 @@ static int cpci_configure_bridge(struct pci_bus* bus, struct pci_dev* dev)
child = pci_find_bus(max + 1);
if (!child)
return -ENODEV;
-#ifdef CONFIG_PROC_FS
pci_proc_attach_bus(child);
-#endif
+
/*
* Update parent bridge's subordinate field if there were more bridges
* behind the bridge that was scanned.
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index ef631358a13c..11dfcf3ed4cd 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -9,10 +9,18 @@ extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
void (*alignf)(void *, struct resource *,
unsigned long, unsigned long),
void *alignf_data);
+/* PCI /proc functions */
+#ifdef CONFIG_PROC_FS
extern int pci_proc_attach_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_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 */
extern struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr);
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 2c65c32e15dd..77ba7f80dc60 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -599,7 +599,6 @@ __initcall(pci_proc_init);
#ifdef CONFIG_HOTPLUG
EXPORT_SYMBOL(pci_proc_attach_device);
-EXPORT_SYMBOL(pci_proc_detach_device);
EXPORT_SYMBOL(pci_proc_attach_bus);
EXPORT_SYMBOL(pci_proc_detach_bus);
EXPORT_SYMBOL(proc_bus_pci_dir);