From: Jarkko Nikula Date: Fri, 31 Oct 2008 12:18:52 +0000 (+0200) Subject: SPI: TSC2301: Switch to gpio_request/free calls X-Git-Tag: v2.6.28-omap1~129 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=aa523d750bb900adc6b8bda06ba22b835d2fbf0d;p=linux-2.6-omap-h63xx.git SPI: TSC2301: Switch to gpio_request/free calls Signed-off-by: Jarkko Nikula Signed-off-by: Tony Lindgren --- diff --git a/drivers/spi/tsc2301-core.c b/drivers/spi/tsc2301-core.c index 715e400ebf7..4b565b774c4 100644 --- a/drivers/spi/tsc2301-core.c +++ b/drivers/spi/tsc2301-core.c @@ -22,13 +22,10 @@ #include #include #include +#include #include #include -#ifdef CONFIG_ARCH_OMAP -#include -#endif - u16 tsc2301_read_reg(struct tsc2301 *tsc, int reg) { struct spi_transfer t[2]; @@ -157,14 +154,12 @@ static int __devinit tsc2301_probe(struct spi_device *spi) if (pdata->reset_gpio >= 0) { tsc->reset_gpio = pdata->reset_gpio; -#ifdef CONFIG_ARCH_OMAP - r = omap_request_gpio(tsc->reset_gpio); + r = gpio_request(tsc->reset_gpio, "TSC2301 reset"); if (r < 0) goto err1; gpio_direction_output(tsc->reset_gpio, 1); mdelay(1); gpio_set_value(tsc->reset_gpio, 0); -#endif } else tsc->reset_gpio = -1; @@ -229,8 +224,10 @@ static int __devexit tsc2301_remove(struct spi_device *spi) struct tsc2301 *tsc = dev_get_drvdata(&spi->dev); tsc2301_mixer_exit(tsc); - tsc2301_ts_exit(tsc); - tsc2301_kp_exit(tsc); + tsc2301_ts_exit(tsc); + tsc2301_kp_exit(tsc); + if (tsc->reset_gpio >= 0) + gpio_free(tsc->reset_gpio); kfree(tsc); return 0;