diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-30 04:18:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-30 04:18:56 -0400 |
commit | c510b9bfa1c34c1452f7a4389ff6de4f72a78193 (patch) | |
tree | daf2b427a463ae4355b8f91e304f4e6fa700d1df /arch/sparc64 | |
parent | e0ac612e6997429a21887475709ca6d6224971f2 (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/sparc64')
-rw-r--r-- | arch/sparc64/kernel/pci.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/power.c | 16 |
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) | |||
799 | pbm->scan_bus(pbm); | 799 | pbm->scan_bus(pbm); |
800 | } | 800 | } |
801 | 801 | ||
802 | extern void power_init(void); | ||
803 | |||
804 | static int __init pcibios_init(void) | 802 | static int __init pcibios_init(void) |
805 | { | 803 | { |
806 | pci_controller_probe(); | 804 | pci_controller_probe(); |
@@ -809,8 +807,6 @@ static int __init pcibios_init(void) | |||
809 | 807 | ||
810 | pci_scan_each_controller_bus(); | 808 | pci_scan_each_controller_bus(); |
811 | 809 | ||
812 | power_init(); | ||
813 | |||
814 | return 0; | 810 | return 0; |
815 | } | 811 | } |
816 | 812 | ||
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 @@ | |||
1 | /* power.c: Power management driver. | 1 | /* power.c: Power management driver. |
2 | * | 2 | * |
3 | * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net) | 3 | * Copyright (C) 1999, 2007, 2008 David S. Miller (davem@davemloft.net) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/sched.h> | ||
10 | #include <linux/signal.h> | ||
11 | #include <linux/delay.h> | ||
12 | #include <linux/interrupt.h> | 9 | #include <linux/interrupt.h> |
13 | #include <linux/pm.h> | 10 | #include <linux/pm.h> |
14 | #include <linux/syscalls.h> | ||
15 | #include <linux/reboot.h> | 11 | #include <linux/reboot.h> |
16 | #include <linux/of_device.h> | 12 | #include <linux/of_device.h> |
17 | 13 | ||
18 | #include <asm/system.h> | ||
19 | #include <asm/auxio.h> | 14 | #include <asm/auxio.h> |
20 | #include <asm/prom.h> | 15 | #include <asm/prom.h> |
21 | #include <asm/io.h> | 16 | #include <asm/io.h> |
22 | #include <asm/sstate.h> | 17 | #include <asm/sstate.h> |
23 | #include <asm/reboot.h> | 18 | #include <asm/reboot.h> |
24 | 19 | ||
25 | #include <linux/unistd.h> | ||
26 | |||
27 | /* | 20 | /* |
28 | * sysctl - toggle power-off restriction for serial console | 21 | * sysctl - toggle power-off restriction for serial console |
29 | * systems in machine_power_off() | 22 | * systems in machine_power_off() |
@@ -111,8 +104,9 @@ static struct of_platform_driver power_driver = { | |||
111 | }, | 104 | }, |
112 | }; | 105 | }; |
113 | 106 | ||
114 | void __init power_init(void) | 107 | static int __init power_init(void) |
115 | { | 108 | { |
116 | of_register_driver(&power_driver, &of_platform_bus_type); | 109 | return of_register_driver(&power_driver, &of_platform_bus_type); |
117 | return; | ||
118 | } | 110 | } |
111 | |||
112 | device_initcall(power_init); | ||