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]
Message-ID: <20121207062524.11051.46916.stgit@amt.stowe>
Date:	Thu, 06 Dec 2012 23:25:25 -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 05/15] PCI/acpiphp: Collapse initialization call chain of
	"acpiphp" sub-driver

This patch collapses the initialization call chain of "acpiphp" by calling
acpiphp_glue_init() directly within acphphp_init(), removing the
intervening init_acpi() call.

No functional change.

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

 drivers/pci/hotplug/acpiphp_core.c |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c
index 011a538..1f4e228 100644
--- a/drivers/pci/hotplug/acpiphp_core.c
+++ b/drivers/pci/hotplug/acpiphp_core.c
@@ -271,14 +271,6 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
 	return 0;
 }
 
-static int __init init_acpi(void)
-{
-	/* initialize internal data structure etc. */
-	acpiphp_glue_init();
-
-	return 0;
-}
-
 /**
  * release_slot - free up the memory used by a slot
  * @hotplug_slot: slot to free
@@ -363,21 +355,19 @@ static int __init acpiphp_init(void)
 {
 	info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
 
-	if (acpi_pci_disabled)
-		return 0;
+	if (!acpi_pci_disabled)
+		/* initialize internal data structure etc. */
+		acpiphp_glue_init();
 
-	/* read all the ACPI info from the system */
-	return init_acpi();
+	return 0;
 }
 
 
 static void __exit acpiphp_exit(void)
 {
-	if (acpi_pci_disabled)
-		return;
-
-	/* deallocate internal data structures etc. */
-	acpiphp_glue_exit();
+	if (!acpi_pci_disabled)
+		/* deallocate internal data structures etc. */
+		acpiphp_glue_exit();
 }
 
 module_init(acpiphp_init);

--
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