diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2002-09-19 03:47:49 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-09-19 03:47:49 -0700 |
| commit | bb7006cb5c6c81941ab2f33414b4cbfe8e74dfc5 (patch) | |
| tree | c406c1461ab4761bd04544dd6ffc320265984f8d /drivers/hotplug | |
| parent | 371a77dad179a60374309aa43da70e85332ba290 (diff) | |
PCI Hotplug: created /proc/bus/pci/slots for pcihpfs to be mounted on.
proc_bus_pci_dir had to be exported for this to work properly.
Diffstat (limited to 'drivers/hotplug')
| -rw-r--r-- | drivers/hotplug/pci_hotplug_core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/hotplug/pci_hotplug_core.c b/drivers/hotplug/pci_hotplug_core.c index 898a198f82b3..89e2247acd80 100644 --- a/drivers/hotplug/pci_hotplug_core.c +++ b/drivers/hotplug/pci_hotplug_core.c @@ -39,6 +39,7 @@ #include <linux/namei.h> #include <linux/pci.h> #include <linux/dnotify.h> +#include <linux/proc_fs.h> #include <asm/uaccess.h> #include "pci_hotplug.h" @@ -113,6 +114,12 @@ static char *pci_bus_speed_strings[] = { "133 MHz PCIX 533", /* 0x13 */ }; +#ifdef CONFIG_PROC_FS +extern struct proc_dir_entry *proc_bus_pci_dir; +static struct proc_dir_entry *slotdir = NULL; +static const char *slotdir_name = "slots"; +#endif + static struct inode *pcihpfs_get_inode (struct super_block *sb, int mode, int dev) { struct inode *inode = new_inode(sb); @@ -1265,6 +1272,11 @@ static int __init pci_hotplug_init (void) goto exit; } +#ifdef CONFIG_PROC_FS + /* create mount point for pcihpfs */ + slotdir = proc_mkdir(slotdir_name, proc_bus_pci_dir); +#endif + info (DRIVER_DESC " version: " DRIVER_VERSION "\n"); exit: @@ -1274,6 +1286,11 @@ exit: static void __exit pci_hotplug_exit (void) { unregister_filesystem(&pcihpfs_type); + +#ifdef CONFIG_PROC_FS + if (slotdir) + remove_proc_entry(slotdir_name, proc_bus_pci_dir); +#endif } module_init(pci_hotplug_init); |
