aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/cpqphp_core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-12-14 12:37:26 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-09 15:13:20 -0500
commit9f3f4681291fc88864bb27f8f3832b95bb53aae5 (patch)
treeab36943b21c2b0833478ad2bbc54928ced5dc4c8 /drivers/pci/hotplug/cpqphp_core.c
parent121082e2ab09d5e90ac27e38900c018e6f37bcdf (diff)
[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 <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/cpqphp_core.c')
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index d3644709a035..b3659ffccac9 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)
479 old_slot = next_slot; 479 old_slot = next_slot;
480 } 480 }
481 481
482 cpqhp_remove_debugfs_files(ctrl);
483
482 //Free IRQ associated with hot plug device 484 //Free IRQ associated with hot plug device
483 free_irq(ctrl->interrupt, ctrl); 485 free_irq(ctrl->interrupt, ctrl);
484 //Unmap the memory 486 //Unmap the memory
@@ -1275,7 +1277,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1275 // Done with exclusive hardware access 1277 // Done with exclusive hardware access
1276 up(&ctrl->crit_sect); 1278 up(&ctrl->crit_sect);
1277 1279
1278 cpqhp_create_ctrl_files(ctrl); 1280 cpqhp_create_debugfs_files(ctrl);
1279 1281
1280 return 0; 1282 return 0;
1281 1283
@@ -1515,6 +1517,7 @@ static int __init cpqhpc_init(void)
1515 cpqhp_debug = debug; 1517 cpqhp_debug = debug;
1516 1518
1517 info (DRIVER_DESC " version: " DRIVER_VERSION "\n"); 1519 info (DRIVER_DESC " version: " DRIVER_VERSION "\n");
1520 cpqhp_initialize_debugfs();
1518 result = pci_register_driver(&cpqhpc_driver); 1521 result = pci_register_driver(&cpqhpc_driver);
1519 dbg("pci_register_driver = %d\n", result); 1522 dbg("pci_register_driver = %d\n", result);
1520 return result; 1523 return result;
@@ -1528,6 +1531,7 @@ static void __exit cpqhpc_cleanup(void)
1528 1531
1529 dbg("pci_unregister_driver\n"); 1532 dbg("pci_unregister_driver\n");
1530 pci_unregister_driver(&cpqhpc_driver); 1533 pci_unregister_driver(&cpqhpc_driver);
1534 cpqhp_shutdown_debugfs();
1531} 1535}
1532 1536
1533 1537