diff options
author | Andi Kleen <ak@suse.de> | 2007-02-13 13:26:26 +0100 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-02-13 13:26:26 +0100 |
commit | 62cc49396e593dd71c6595302bb10b085aefbfa5 (patch) | |
tree | a4487294b3ea5c6b4f90fb9b4fd46a64b852d450 /arch/i386/kernel/pcspeaker.c | |
parent | 40d22c1b5675e428b3f3f9a945d0bd62e94ca2f1 (diff) |
[PATCH] x86: Unify pcspeaker platform device code between i386/x86-64
Trivial cleanup.
Only change is that it is always compiled in now on x86-64 like on i386.
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/pcspeaker.c')
-rw-r--r-- | arch/i386/kernel/pcspeaker.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/i386/kernel/pcspeaker.c b/arch/i386/kernel/pcspeaker.c new file mode 100644 index 00000000000..bc1f2d3ea27 --- /dev/null +++ b/arch/i386/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); |