From 9f3f4681291fc88864bb27f8f3832b95bb53aae5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 14 Dec 2005 09:37:26 -0800 Subject: [PATCH] PCI Hotplug: fix up the sysfs file in the compaq pci hotplug driver The Compaq PCI Hotplug driver was creating 2 sysfs files that contained nothing but debug information, and had way more than "one value" in them. This patch converts the code to use debugfs for these files instead. Compile tested only. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/cpqphp_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/pci/hotplug/cpqphp_core.c') diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index d364470..b3659ff 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c @@ -479,6 +479,8 @@ static int ctrl_slot_cleanup (struct controller * ctrl) old_slot = next_slot; } + cpqhp_remove_debugfs_files(ctrl); + //Free IRQ associated with hot plug device free_irq(ctrl->interrupt, ctrl); //Unmap the memory @@ -1275,7 +1277,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) // Done with exclusive hardware access up(&ctrl->crit_sect); - cpqhp_create_ctrl_files(ctrl); + cpqhp_create_debugfs_files(ctrl); return 0; @@ -1515,6 +1517,7 @@ static int __init cpqhpc_init(void) cpqhp_debug = debug; info (DRIVER_DESC " version: " DRIVER_VERSION "\n"); + cpqhp_initialize_debugfs(); result = pci_register_driver(&cpqhpc_driver); dbg("pci_register_driver = %d\n", result); return result; @@ -1528,6 +1531,7 @@ static void __exit cpqhpc_cleanup(void) dbg("pci_unregister_driver\n"); pci_unregister_driver(&cpqhpc_driver); + cpqhp_shutdown_debugfs(); } -- cgit v1.1