Andi Kleen | 62cc4939 | 2007-02-13 13:26:26 +0100 | [diff] [blame] | 1 | #include <linux/platform_device.h> |
Akinobu Mita | 153dab7 | 2008-09-21 23:25:40 +0900 | [diff] [blame] | 2 | #include <linux/err.h> |
Andi Kleen | 62cc4939 | 2007-02-13 13:26:26 +0100 | [diff] [blame] | 3 | #include <linux/init.h> |
| 4 | |
| 5 | static __init int add_pcspkr(void) |
| 6 | { |
| 7 | struct platform_device *pd; |
Andi Kleen | 62cc4939 | 2007-02-13 13:26:26 +0100 | [diff] [blame] | 8 | |
Akinobu Mita | 153dab7 | 2008-09-21 23:25:40 +0900 | [diff] [blame] | 9 | pd = platform_device_register_simple("pcspkr", -1, NULL, 0); |
Andi Kleen | 62cc4939 | 2007-02-13 13:26:26 +0100 | [diff] [blame] | 10 | |
Akinobu Mita | 153dab7 | 2008-09-21 23:25:40 +0900 | [diff] [blame] | 11 | return IS_ERR(pd) ? PTR_ERR(pd) : 0; |
Andi Kleen | 62cc4939 | 2007-02-13 13:26:26 +0100 | [diff] [blame] | 12 | } |
| 13 | device_initcall(add_pcspkr); |