pcspkr.c (5d5a2989b72847e1f5763420ea31383ca63ebf53) pcspkr.c (43cc71eed1250755986da4c0f9898f9a635cb3bf)
1/*
2 * PC Speaker beeper driver for Linux
3 *
4 * Copyright (c) 2002 Vojtech Pavlik
5 * Copyright (c) 1992 Orest Zborowski
6 *
7 */
8
9/*
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License version 2 as published by
12 * the Free Software Foundation
13 */
14
15#include <linux/kernel.h>
16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/input.h>
19#include <linux/platform_device.h>
1/*
2 * PC Speaker beeper driver for Linux
3 *
4 * Copyright (c) 2002 Vojtech Pavlik
5 * Copyright (c) 1992 Orest Zborowski
6 *
7 */
8
9/*
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License version 2 as published by
12 * the Free Software Foundation
13 */
14
15#include <linux/kernel.h>
16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/input.h>
19#include <linux/platform_device.h>
20#include <asm/8253pit.h>
20#include <asm/io.h>
21
22MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
23MODULE_DESCRIPTION("PC Speaker beeper driver");
24MODULE_LICENSE("GPL");
21#include <asm/io.h>
22
23MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
24MODULE_DESCRIPTION("PC Speaker beeper driver");
25MODULE_LICENSE("GPL");
26MODULE_ALIAS("platform:pcspkr");
25
26#ifdef CONFIG_X86
27/* Use the global PIT lock ! */
28#include <asm/i8253.h>
29#else
27
28#ifdef CONFIG_X86
29/* Use the global PIT lock ! */
30#include <asm/i8253.h>
31#else
30#include <asm/8253pit.h>
31static DEFINE_SPINLOCK(i8253_lock);
32#endif
33
34static int pcspkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
35{
36 unsigned int count = 0;
37 unsigned long flags;
38

--- 113 unchanged lines hidden ---
32static DEFINE_SPINLOCK(i8253_lock);
33#endif
34
35static int pcspkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
36{
37 unsigned int count = 0;
38 unsigned long flags;
39

--- 113 unchanged lines hidden ---