-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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>
- Loading branch information
Andi Kleen
authored and
Andi Kleen
committed
Feb 13, 2007
1 parent
40d22c1
commit 62cc493
Showing
5 changed files
with
23 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters