aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/qemu
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2008-01-29 10:14:57 +0000
committerRalf Baechle <ralf@linux-mips.org>2008-01-29 10:14:57 +0000
commit19388fb092d89e179575bd0b44f51b57e175edf5 (patch)
treed379d5657e85f026f57e1f193ab963b592a77711 /arch/mips/qemu
parent0ab7aefc4d43a6dee26c891b41ef9c7a67d2379b (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.c15
1 files changed, 15 insertions, 0 deletions
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 <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);