summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/pcspeaker.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-10-11 11:17:01 +0200
committerThomas Gleixner <tglx@linutronix.de>2007-10-11 11:17:01 +0200
commit9a163ed8e0552fdcffe405d2ea7134819a81456e (patch)
treeb322fd2afbb812ba7ddfd22f3734aaab007c2aa5 /arch/x86/kernel/pcspeaker.c
parentf7627e2513987bb5d4e8cb13c4e0a478352141ac (diff)
downloadop-kernel-dev-9a163ed8e0552fdcffe405d2ea7134819a81456e.zip
op-kernel-dev-9a163ed8e0552fdcffe405d2ea7134819a81456e.tar.gz
i386: move kernel
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/pcspeaker.c')
-rw-r--r--arch/x86/kernel/pcspeaker.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/kernel/pcspeaker.c b/arch/x86/kernel/pcspeaker.c
new file mode 100644
index 0000000..bc1f2d3
--- /dev/null
+++ b/arch/x86/kernel/pcspeaker.c
@@ -0,0 +1,20 @@
+#include <linux/platform_device.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+
+static __init int add_pcspkr(void)
+{
+ struct platform_device *pd;
+ int ret;
+
+ pd = platform_device_alloc("pcspkr", -1);
+ if (!pd)
+ return -ENOMEM;
+
+ ret = platform_device_add(pd);
+ if (ret)
+ platform_device_put(pd);
+
+ return ret;
+}
+device_initcall(add_pcspkr);
OpenPOWER on IntegriCloud