diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 09:05:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 09:05:39 -0400 |
commit | a9b9e81c915e4a57ac3b21d1a7fa7ff184639780 (patch) | |
tree | 98304395fbb5b9c74fca35b196cd414c1949f280 /arch/x86/kernel/pcspeaker.c | |
parent | a8b71a2810386a5ac8f43d2095fe3355f0d8db37 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) |
Merge branch 'linus' into x86/memory-corruption-check
Diffstat (limited to 'arch/x86/kernel/pcspeaker.c')
-rw-r--r-- | arch/x86/kernel/pcspeaker.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/x86/kernel/pcspeaker.c b/arch/x86/kernel/pcspeaker.c index bc1f2d3ea277..a311ffcaad16 100644 --- a/arch/x86/kernel/pcspeaker.c +++ b/arch/x86/kernel/pcspeaker.c | |||
@@ -1,20 +1,13 @@ | |||
1 | #include <linux/platform_device.h> | 1 | #include <linux/platform_device.h> |
2 | #include <linux/errno.h> | 2 | #include <linux/err.h> |
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | 4 | ||
5 | static __init int add_pcspkr(void) | 5 | static __init int add_pcspkr(void) |
6 | { | 6 | { |
7 | struct platform_device *pd; | 7 | struct platform_device *pd; |
8 | int ret; | ||
9 | 8 | ||
10 | pd = platform_device_alloc("pcspkr", -1); | 9 | pd = platform_device_register_simple("pcspkr", -1, NULL, 0); |
11 | if (!pd) | ||
12 | return -ENOMEM; | ||
13 | 10 | ||
14 | ret = platform_device_add(pd); | 11 | return IS_ERR(pd) ? PTR_ERR(pd) : 0; |
15 | if (ret) | ||
16 | platform_device_put(pd); | ||
17 | |||
18 | return ret; | ||
19 | } | 12 | } |
20 | device_initcall(add_pcspkr); | 13 | device_initcall(add_pcspkr); |