lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 06 Dec 2012 23:25:42 -0700
From:	Myron Stowe <myron.stowe@...hat.com>
To:	bhelgaas@...gle.com
Cc:	linux-pci@...r.kernel.org, yinghai@...nel.org,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 08/15] PCI/acpiphp: Collapse the initialization call chain of
	"acpiphp" further

This patch collapses the initialization call chain of "acpiphp" by calling
acpi_pci_[un]register_driver() directly within acpiphp_{init,exit}(),
removing the intervening acpiphp_glue_{init,exit}() call.

No functional change.

Signed-off-by: Myron Stowe <myron.stowe@...hat.com>
---

 drivers/pci/hotplug/acpiphp.h      |    2 --
 drivers/pci/hotplug/acpiphp_core.c |    4 ++--
 drivers/pci/hotplug/acpiphp_glue.c |   20 --------------------
 3 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index 37f968e..bf62ac8 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -194,8 +194,6 @@ extern void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
 extern struct acpi_pci_driver acpi_pci_hp_driver;
 extern int acpiphp_add_bridge(struct acpi_pci_root *root);
 extern void acpiphp_remove_bridge(struct acpi_pci_root *root);
-extern void acpiphp_glue_init(void);
-extern void acpiphp_glue_exit(void);
 typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
 
 extern int acpiphp_enable_slot(struct acpiphp_slot *slot);
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c
index 1f4e228..5536b42 100644
--- a/drivers/pci/hotplug/acpiphp_core.c
+++ b/drivers/pci/hotplug/acpiphp_core.c
@@ -357,7 +357,7 @@ static int __init acpiphp_init(void)
 
 	if (!acpi_pci_disabled)
 		/* initialize internal data structure etc. */
-		acpiphp_glue_init();
+		acpi_pci_register_driver(&acpi_pci_hp_driver);
 
 	return 0;
 }
@@ -367,7 +367,7 @@ static void __exit acpiphp_exit(void)
 {
 	if (!acpi_pci_disabled)
 		/* deallocate internal data structures etc. */
-		acpiphp_glue_exit();
+		acpi_pci_unregister_driver(&acpi_pci_hp_driver);
 }
 
 module_init(acpiphp_init);
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index f96b13c..3d5d7da 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -1413,26 +1413,6 @@ struct acpi_pci_driver acpi_pci_hp_driver = {
 };
 
 /**
- * acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures
- */
-void __init acpiphp_glue_init(void)
-{
-	acpi_pci_register_driver(&acpi_pci_hp_driver);
-}
-
-
-/**
- * acpiphp_glue_exit - terminates all PCI hotplug - ACPI glue data structures
- *
- * This function frees all data allocated in acpiphp_glue_init().
- */
-void  acpiphp_glue_exit(void)
-{
-	acpi_pci_unregister_driver(&acpi_pci_hp_driver);
-}
-
-
-/**
  * acpiphp_enable_slot - power on slot
  * @slot: ACPI PHP slot
  */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ