Commit c0688897 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Tony Lindgren

INPUT: TSC2005: Switch to gpio_request/free calls

Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent aae6da6d
...@@ -27,12 +27,9 @@ ...@@ -27,12 +27,9 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#ifdef CONFIG_ARCH_OMAP
#include <mach/gpio.h>
#endif
#include <linux/spi/tsc2005.h> #include <linux/spi/tsc2005.h>
/** /**
...@@ -534,8 +531,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts, ...@@ -534,8 +531,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts,
ts->dav_gpio = dav_gpio; ts->dav_gpio = dav_gpio;
dev_dbg(&ts->spi->dev, "TSC2005: DAV GPIO = %d\n", dav_gpio); dev_dbg(&ts->spi->dev, "TSC2005: DAV GPIO = %d\n", dav_gpio);
#ifdef CONFIG_ARCH_OMAP r = gpio_request(dav_gpio, "TSC2005 dav");
r = omap_request_gpio(dav_gpio);
if (r < 0) { if (r < 0) {
dev_err(&ts->spi->dev, "unable to get DAV GPIO"); dev_err(&ts->spi->dev, "unable to get DAV GPIO");
goto err1; goto err1;
...@@ -543,7 +539,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts, ...@@ -543,7 +539,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts,
gpio_direction_input(dav_gpio); gpio_direction_input(dav_gpio);
ts->irq = gpio_to_irq(dav_gpio); ts->irq = gpio_to_irq(dav_gpio);
dev_dbg(&ts->spi->dev, "TSC2005: DAV IRQ = %d\n", ts->irq); dev_dbg(&ts->spi->dev, "TSC2005: DAV IRQ = %d\n", ts->irq);
#endif
init_timer(&ts->penup_timer); init_timer(&ts->penup_timer);
setup_timer(&ts->penup_timer, tsc2005_ts_penup_timer_handler, setup_timer(&ts->penup_timer, tsc2005_ts_penup_timer_handler,
(unsigned long)ts); (unsigned long)ts);
...@@ -612,9 +608,7 @@ err3: ...@@ -612,9 +608,7 @@ err3:
tsc2005_stop_scan(ts); tsc2005_stop_scan(ts);
input_free_device(idev); input_free_device(idev);
err2: err2:
#ifdef CONFIG_ARCH_OMAP gpio_free(dav_gpio);
omap_free_gpio(dav_gpio);
#endif
err1: err1:
return r; return r;
} }
...@@ -672,9 +666,7 @@ static int __devexit tsc2005_remove(struct spi_device *spi) ...@@ -672,9 +666,7 @@ static int __devexit tsc2005_remove(struct spi_device *spi)
free_irq(ts->irq, ts); free_irq(ts->irq, ts);
input_unregister_device(ts->idev); input_unregister_device(ts->idev);
#ifdef CONFIG_ARCH_OMAP gpio_free(ts->dav_gpio);
omap_free_gpio(ts->dav_gpio);
#endif
kfree(ts); kfree(ts);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment