v2.6.22.24-op1
[linux-2.6.22.y-op.git] / arch / i386 / kernel / pcspeaker.c
blobbc1f2d3ea277817145cc7964f757c18ef3e21a51
1 #include <linux/platform_device.h>
2 #include <linux/errno.h>
3 #include <linux/init.h>
5 static __init int add_pcspkr(void)
7 struct platform_device *pd;
8 int ret;
10 pd = platform_device_alloc("pcspkr", -1);
11 if (!pd)
12 return -ENOMEM;
14 ret = platform_device_add(pd);
15 if (ret)
16 platform_device_put(pd);
18 return ret;
20 device_initcall(add_pcspkr);