diff options
-rw-r--r-- | drivers/input/misc/ixp4xx-beeper.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c index f34beb228d36..f14afd09e34d 100644 --- a/drivers/input/misc/ixp4xx-beeper.c +++ b/drivers/input/misc/ixp4xx-beeper.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | 25 | ||
25 | MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); | 26 | MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); |
@@ -35,15 +36,12 @@ static void ixp4xx_spkr_control(unsigned int pin, unsigned int count) | |||
35 | 36 | ||
36 | spin_lock_irqsave(&beep_lock, flags); | 37 | spin_lock_irqsave(&beep_lock, flags); |
37 | 38 | ||
38 | if (count) { | 39 | if (count) { |
39 | gpio_line_config(pin, IXP4XX_GPIO_OUT); | 40 | gpio_direction_output(pin, 0); |
40 | gpio_line_set(pin, IXP4XX_GPIO_LOW); | ||
41 | |||
42 | *IXP4XX_OSRT2 = (count & ~IXP4XX_OST_RELOAD_MASK) | IXP4XX_OST_ENABLE; | 41 | *IXP4XX_OSRT2 = (count & ~IXP4XX_OST_RELOAD_MASK) | IXP4XX_OST_ENABLE; |
43 | } else { | 42 | } else { |
44 | gpio_line_config(pin, IXP4XX_GPIO_IN); | 43 | gpio_direction_output(pin, 1); |
45 | gpio_line_set(pin, IXP4XX_GPIO_HIGH); | 44 | gpio_direction_input(pin); |
46 | |||
47 | *IXP4XX_OSRT2 = 0; | 45 | *IXP4XX_OSRT2 = 0; |
48 | } | 46 | } |
49 | 47 | ||