File: pcspeaker.c

package info (click to toggle)
linux 3.12.9-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 652,128 kB
  • sloc: ansic: 11,461,117; asm: 271,295; perl: 52,892; xml: 46,562; makefile: 28,674; sh: 6,008; python: 5,389; cpp: 5,117; yacc: 3,571; lex: 2,044; awk: 716; pascal: 231; lisp: 218; sed: 30
file content (13 lines) | stat: -rw-r--r-- 282 bytes parent folder | download | duplicates (26)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/init.h>

static __init int add_pcspkr(void)
{
	struct platform_device *pd;

	pd = platform_device_register_simple("pcspkr", -1, NULL, 0);

	return IS_ERR(pd) ? PTR_ERR(pd) : 0;
}
device_initcall(add_pcspkr);