From 19388fb092d89e179575bd0b44f51b57e175edf5 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 29 Jan 2008 10:14:57 +0000 Subject: [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 --- arch/mips/qemu/q-setup.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/mips/qemu') diff --git a/arch/mips/qemu/q-setup.c b/arch/mips/qemu/q-setup.c index 969cedc8d8b..9f0c2d3c67e 100644 --- a/arch/mips/qemu/q-setup.c +++ b/arch/mips/qemu/q-setup.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -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); -- cgit v1.2.3