Message ID | 1370420821-28420-53-git-send-email-horms+renesas@verge.net.au (mailing list archive) |
---|---|
State | Accepted |
Commit | a2ddc2323c4b14234eab9dc9f230d531475e056d |
Headers | show |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 9ee8bcd..0109bb3 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -1037,22 +1037,13 @@ out: #define IRQ7 evt2irq(0x02e0) /* IRQ7A */ static int ts_get_pendown_state(void) { - int val; - - gpio_free(GPIO_TSC_IRQ); - - gpio_request_one(GPIO_TSC_PORT, GPIOF_IN, NULL); - - val = gpio_get_value(GPIO_TSC_PORT); - - gpio_request(GPIO_TSC_IRQ, NULL); - - return !val; + return !gpio_get_value(GPIO_TSC_PORT); } static int ts_init(void) { gpio_request(GPIO_TSC_IRQ, NULL); + gpio_request_one(GPIO_TSC_PORT, GPIOF_IN, NULL); return 0; }