linux/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 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ad7877.c Input: ad7877 - switch to using threaded IRQ 2010-10-18 09:35:13 -07:00
ad7879-i2c.c Input: ad7879 - convert I2C to dev_pm_ops 2011-01-06 23:02:52 -08:00
ad7879-spi.c Input: ad7879 - fix spi word size to 16 bit 2010-07-03 13:13:20 -07:00
ad7879.c Input: ad7879 - prevent invalid finger data reports 2010-10-28 22:32:50 -07:00
ad7879.h Input: ad7879 - add open and close methods 2010-07-03 13:13:14 -07:00
ads7846.c Input: ads7846 - check proper condition when freeing gpio 2011-02-11 00:58:24 -08:00
atmel-wm97xx.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
atmel_tsadcc.c Input: atmel_tsadcc - use platform parameters 2009-11-20 00:55:21 -08:00
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 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dynapro.c Input: add driver for Dynapro serial touchscreen 2009-10-26 11:01:30 -07:00
eeti_ts.c Input: eeti_ts - convert to dev_pm_ops 2011-01-06 23:02:57 -08:00
elo.c Input: elo - switch to using dev_xxx() when printing messages 2010-01-06 23:54:40 -08:00
fujitsu_ts.c
gunze.c
h3600_ts_input.c Input: serio - don't use serio->write() directly 2009-08-05 00:43:43 -07:00
hampshire.c Input: add driver for hampshire serial touchscreens 2010-04-13 23:27:41 -07:00
hp680_ts_input.c input: hp680_ts_input: ctrl_in/outX to __raw_read/writeX conversion. 2010-10-27 15:25:42 +09:00
htcpen.c
inexio.c
intel-mid-touch.c Input: mrst-touchscreen - move out of staging 2010-09-01 19:43:36 -07:00
jornada720_ts.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig Input: add ST1232 touchscreen controller driver 2010-12-15 23:40:13 -08:00
lpc32xx_ts.c Input: add LPC32xx touchscreen controller driver 2010-08-28 22:46:18 -07:00
mainstone-wm97xx.c Input: wm97xx - provide coordinate logs for accelerated I/O 2010-01-28 22:38:30 -08:00
Makefile Input: add ST1232 touchscreen controller driver 2010-12-15 23:40:13 -08:00
mc13783_ts.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mcs5000_ts.c Input: mcs5000_ts - convert to dev_pm_ops 2011-01-06 23:03:03 -08:00
migor_ts.c Input: migor_ts - convert to dev_pm_ops 2011-01-06 23:03:07 -08:00
mk712.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
mtouch.c
pcap_ts.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
penmount.c
qt602240_ts.c Input: qt602240_ts - fix wrong sizeof in object table allocation 2010-11-18 00:17:12 -08:00
s3c2410_ts.c Input: s3c2410_ts - fix s3c2410ts_probe error path 2010-09-02 20:11:52 -07:00
st1232.c Input: add ST1232 touchscreen controller driver 2010-12-15 23:40:13 -08:00
stmpe-ts.c Input: stmpe-ts - return -ENOMEM when memory allocation fails 2010-09-05 12:09:12 -07:00
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 Input: tps6507x-ts - properly unregister input device on removal 2010-09-02 20:12:42 -07:00
tsc2007.c Input: tsc2007 - fix a redundant assignment for pdata 2010-09-02 20:14:00 -07:00
ucb1400_ts.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
usbtouchscreen.c Input: usbtouchscreen - add support for LG Flatron T1710B 2010-11-22 12:01:13 -08:00
w90p910_ts.c Input: w90p910_ts - fix call to setup_timer() 2010-07-15 23:51:03 -07:00
wacom_w8001.c Input: wacom_w8001 - report resolution to userland 2011-01-31 21:32:24 -08:00
wm97xx-core.c Input: wm97xx-core - add retries to wm97xx_read_aux_adc 2010-09-05 12:14:36 -07:00
wm9705.c Merge branch 'next' into for-linus 2008-10-15 23:29:12 -04:00
wm9712.c Merge branch 'next' into for-linus 2008-10-15 23:29:12 -04:00
wm9713.c Merge branch 'next' into for-linus 2008-10-15 23:29:12 -04:00
zylonite-wm97xx.c Input: wm97xx - provide coordinate logs for accelerated I/O 2010-01-28 22:38:30 -08:00