kernel_optimize_test/drivers/input/touchscreen
Dmitry Torokhov 0fbc9fdb7e Input: ads7846 - check proper condition when freeing gpio
When driver uses custom pendown detection method gpio_pendown is not
set up and so we should not try to free it, otherwise we are presented
with:

------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:1258 gpio_free+0x100/0x12c()
Modules linked in:
[<c0061208>] (unwind_backtrace+0x0/0xe4) from [<c0091f58>](warn_slowpath_common+0x4c/0x64)
[<c0091f58>] (warn_slowpath_common+0x4c/0x64) from [<c0091f88>](warn_slowpath_null+0x18/0x1c)
[<c0091f88>] (warn_slowpath_null+0x18/0x1c) from [<c024e610>](gpio_free+0x100/0x12c)
[<c024e610>] (gpio_free+0x100/0x12c) from [<c03e9fbc>](ads7846_probe+0xa38/0xc5c)
[<c03e9fbc>] (ads7846_probe+0xa38/0xc5c) from [<c02cff14>](spi_drv_probe+0x18/0x1c)
[<c02cff14>] (spi_drv_probe+0x18/0x1c) from [<c028bca4>](driver_probe_device+0xc8/0x184)
[<c028bca4>] (driver_probe_device+0xc8/0x184) from [<c028bdc8>](__driver_attach+0x68/0x8c)
[<c028bdc8>] (__driver_attach+0x68/0x8c) from [<c028b4c8>](bus_for_each_dev+0x48/0x74)
[<c028b4c8>] (bus_for_each_dev+0x48/0x74) from [<c028ae08>](bus_add_driver+0xa0/0x220)
[<c028ae08>] (bus_add_driver+0xa0/0x220) from [<c028c0c0>](driver_register+0xa8/0x134)
[<c028c0c0>] (driver_register+0xa8/0x134) from [<c0050550>](do_one_initcall+0xcc/0x1a4)
[<c0050550>] (do_one_initcall+0xcc/0x1a4) from [<c00084e4>](kernel_init+0x14c/0x214)
[<c00084e4>] (kernel_init+0x14c/0x214) from [<c005b494>](kernel_thread_exit+0x0/0x8)
---[ end trace 4053287f8a5ec18f ]---

Also rearrange ads7846_setup_pendown() to have only one exit point
returning success.

Reported-by: Sourav Poddar <sourav.poddar@ti.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Reviewed-by: Charulatha V <charu@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-11 00:58:24 -08:00
..
88pm860x-ts.c
ad7877.c
ad7879-i2c.c
ad7879-spi.c
ad7879.c
ad7879.h
ads7846.c Input: ads7846 - check proper condition when freeing gpio 2011-02-11 00:58:24 -08:00
atmel_tsadcc.c
atmel-wm97xx.c
bu21013_ts.c Input: bu21013_ts - added regulator support 2011-01-17 20:49:16 -08:00
cy8ctmg110_ts.c Input: cy8ctmg110_ts - Convert to dev_pm_ops 2011-01-06 23:03:11 -08:00
da9034-ts.c
dynapro.c
eeti_ts.c
elo.c
fujitsu_ts.c
gunze.c
h3600_ts_input.c
hampshire.c
hp680_ts_input.c
htcpen.c
inexio.c
intel-mid-touch.c
jornada720_ts.c
Kconfig
lpc32xx_ts.c
mainstone-wm97xx.c
Makefile
mc13783_ts.c
mcs5000_ts.c
migor_ts.c Input: migor_ts - convert to dev_pm_ops 2011-01-06 23:03:07 -08:00
mk712.c
mtouch.c
pcap_ts.c
penmount.c
qt602240_ts.c
s3c2410_ts.c
st1232.c
stmpe-ts.c
tnetv107x-ts.c Input: tnetv107x-ts - don't treat NULL clk as an error 2011-01-17 20:49:07 -08:00
touchit213.c
touchright.c
touchwin.c
tps6507x-ts.c
tsc2007.c
ucb1400_ts.c
usbtouchscreen.c
w90p910_ts.c
wacom_w8001.c Input: wacom_w8001 - report resolution to userland 2011-01-31 21:32:24 -08:00
wm97xx-core.c
wm9705.c
wm9712.c
wm9713.c
zylonite-wm97xx.c