diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2008-01-29 05:14:57 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-01-29 05:14:57 -0500 |
commit | 19388fb092d89e179575bd0b44f51b57e175edf5 (patch) | |
tree | d379d5657e85f026f57e1f193ab963b592a77711 /arch/mips/qemu | |
parent | 0ab7aefc4d43a6dee26c891b41ef9c7a67d2379b (diff) |
[MIPS] Cleanup pcspeaker platform device registration.
Move registration into the actual platform code instead of making a
desparate attempt at sharing the hand full of likes of code in pcspeaker.c.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/qemu')
-rw-r--r-- | arch/mips/qemu/q-setup.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/qemu/q-setup.c b/arch/mips/qemu/q-setup.c index 969cedc8d8b9..9f0c2d3c67ea 100644 --- a/arch/mips/qemu/q-setup.c +++ b/arch/mips/qemu/q-setup.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | #include <linux/platform_device.h> | ||
2 | 3 | ||
3 | #include <asm/i8253.h> | 4 | #include <asm/i8253.h> |
4 | #include <asm/io.h> | 5 | #include <asm/io.h> |
@@ -20,3 +21,17 @@ void __init plat_mem_setup(void) | |||
20 | { | 21 | { |
21 | qemu_reboot_setup(); | 22 | qemu_reboot_setup(); |
22 | } | 23 | } |
24 | |||
25 | static struct platform_device pcspeaker_pdev = { | ||
26 | .name = "pcspkr", | ||
27 | .id = -1, | ||
28 | }; | ||
29 | |||
30 | static int __init qemu_platform_devinit(void) | ||
31 | { | ||
32 | platform_device_register(&pcspeaker_pdev); | ||
33 | |||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | device_initcall(qemu_platform_devinit); | ||