diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2008-01-29 11:14:57 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-01-29 11:14:57 +0100 |
commit | 19388fb092d89e179575bd0b44f51b57e175edf5 (patch) | |
tree | d379d5657e85f026f57e1f193ab963b592a77711 /arch/mips/qemu | |
parent | [MIPS] MT: Scheduler support for SMT (diff) | |
download | linux-19388fb092d89e179575bd0b44f51b57e175edf5.tar.xz linux-19388fb092d89e179575bd0b44f51b57e175edf5.zip |
[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 @@ #include <linux/init.h> +#include <linux/platform_device.h> #include <asm/i8253.h> #include <asm/io.h> @@ -20,3 +21,17 @@ void __init plat_mem_setup(void) { qemu_reboot_setup(); } + +static struct platform_device pcspeaker_pdev = { + .name = "pcspkr", + .id = -1, +}; + +static int __init qemu_platform_devinit(void) +{ + platform_device_register(&pcspeaker_pdev); + + return 0; +} + +device_initcall(qemu_platform_devinit); |