summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-30 01:18:56 -0700
committerDavid S. Miller <davem@davemloft.net>2008-08-30 01:18:56 -0700
commitc510b9bfa1c34c1452f7a4389ff6de4f72a78193 (patch)
treedaf2b427a463ae4355b8f91e304f4e6fa700d1df /arch
parente0ac612e6997429a21887475709ca6d6224971f2 (diff)
sparc64: Don't invoke power_init() from pcibios_init().
That's just silly, use device_initcall() instead. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/pci.c4
-rw-r--r--arch/sparc64/kernel/power.c16
2 files changed, 5 insertions, 15 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 218778617ee4..83c50a62970d 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -799,8 +799,6 @@ static void __init pci_scan_each_controller_bus(void)
pbm->scan_bus(pbm);
}
-extern void power_init(void);
-
static int __init pcibios_init(void)
{
pci_controller_probe();
@@ -809,8 +807,6 @@ static int __init pcibios_init(void)
pci_scan_each_controller_bus();
- power_init();
-
return 0;
}
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 3bb987a6d03c..7536255ab573 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -1,29 +1,22 @@
/* power.c: Power management driver.
*
- * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net)
+ * Copyright (C) 1999, 2007, 2008 David S. Miller (davem@davemloft.net)
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
-#include <linux/sched.h>
-#include <linux/signal.h>
-#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/pm.h>
-#include <linux/syscalls.h>
#include <linux/reboot.h>
#include <linux/of_device.h>
-#include <asm/system.h>
#include <asm/auxio.h>
#include <asm/prom.h>
#include <asm/io.h>
#include <asm/sstate.h>
#include <asm/reboot.h>
-#include <linux/unistd.h>
-
/*
* sysctl - toggle power-off restriction for serial console
* systems in machine_power_off()
@@ -111,8 +104,9 @@ static struct of_platform_driver power_driver = {
},
};
-void __init power_init(void)
+static int __init power_init(void)
{
- of_register_driver(&power_driver, &of_platform_bus_type);
- return;
+ return of_register_driver(&power_driver, &of_platform_bus_type);
}
+
+device_initcall(power_init);