From: Jarkko Nikula Date: Fri, 31 Oct 2008 12:18:55 +0000 (+0200) Subject: INPUT: TSC2005: Switch to gpio_request/free calls X-Git-Tag: v2.6.28-omap1~126 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c06888972957f13e71d2a7a08c276b4e623d859f;p=linux-2.6-omap-h63xx.git INPUT: TSC2005: Switch to gpio_request/free calls Signed-off-by: Jarkko Nikula Signed-off-by: Tony Lindgren --- diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 38ac5377bad..03c3a102dd6 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -27,12 +27,9 @@ #include #include #include +#include #include -#ifdef CONFIG_ARCH_OMAP -#include -#endif - #include /** @@ -534,8 +531,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts, ts->dav_gpio = dav_gpio; dev_dbg(&ts->spi->dev, "TSC2005: DAV GPIO = %d\n", dav_gpio); -#ifdef CONFIG_ARCH_OMAP - r = omap_request_gpio(dav_gpio); + r = gpio_request(dav_gpio, "TSC2005 dav"); if (r < 0) { dev_err(&ts->spi->dev, "unable to get DAV GPIO"); goto err1; @@ -543,7 +539,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts, gpio_direction_input(dav_gpio); ts->irq = gpio_to_irq(dav_gpio); dev_dbg(&ts->spi->dev, "TSC2005: DAV IRQ = %d\n", ts->irq); -#endif + init_timer(&ts->penup_timer); setup_timer(&ts->penup_timer, tsc2005_ts_penup_timer_handler, (unsigned long)ts); @@ -612,9 +608,7 @@ err3: tsc2005_stop_scan(ts); input_free_device(idev); err2: -#ifdef CONFIG_ARCH_OMAP - omap_free_gpio(dav_gpio); -#endif + gpio_free(dav_gpio); err1: return r; } @@ -672,9 +666,7 @@ static int __devexit tsc2005_remove(struct spi_device *spi) free_irq(ts->irq, ts); input_unregister_device(ts->idev); -#ifdef CONFIG_ARCH_OMAP - omap_free_gpio(ts->dav_gpio); -#endif + gpio_free(ts->dav_gpio); kfree(ts); return 0;