summaryrefslogtreecommitdiffstats
path: root/drivers/staging/cptm1217/clearpad_tm1217.c
AgeCommit message (Collapse)AuthorFilesLines
2015-02-03staging: cptm1217: blow it all awayAlan Cox1-671/+0
We have a drivers/input layer for Synaptics products and nothing should now be using the staging driver. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17cptm1217: check if interrupts are masked at probeDevendra Naga1-0/+6
the function cp_tm1217_mask_interrupt can return failure. added the check and the failure path. Cc: Ramesh Agarwal <ramesh.agarwal@intel.com> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: cptm1217: Remove useless cast on void pointerTapasweni Pathak1-1/+1
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20staging/cptm1217: fix checkpatch warnings about else clauseEvgeny Budilovsky1-8/+7
Signed-off-by: Evgeny Budilovsky <budevg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29staging: Remove OOM message after input_allocate_deviceJoe Perches1-2/+0
Emitting an OOM message isn't necessary after input_allocate_device as there's a generic OOM and a dump_stack already done. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13staging: cptm1217: don't call input_free_device() after ↵Wei Yongjun1-3/+1
input_unregister_device() input_free_device() should only be used if input_register_device() was not called yet or if it failed. Once device was unregistered use input_unregister_device() and memory will be freed once last reference to the device is dropped. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-08staging: cptm1217: Use dev_pm_opsLars-Peter Clausen1-4/+12
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-11staging: Remove unnecessary OOM messagesJoe Perches1-4/+1
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kzallocs with multiplies to kcalloc. Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/strlen/strncpy to kstrdup. Moved a spin_lock below a removed OOM message and removed a now unnecessary spin_unlock. Neatened alignment and whitespace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: cptm1217: use module_i2c_driver macroDevendra Naga1-12/+1
use the module_i2c_driver and remove the reimplementation of module_i2c_driver Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12Staging: cptm1217: clearpad_tm1217: fix coding style issuesAdnan Ali1-2/+2
This commit fixes coding style issues including quoted string across multiple lines. Signed-off-by: Adnan Ali <adnan.ali@codethink.co.uk> Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-05-18drivers/staging/cptm1217/clearpad_tm1217.c: Correct call to input_free_deviceJulia Lawall1-2/+3
This code is in a loop that currently is only executed once. Because of this property, the first block of code is currently actually correct. Nevertheless, the comments associated with the code suggest that the loop is planned to take more than one iteration in the future, and thus this patch is made with that case in mind. In the first block of code, there is currently an immediate abort from the function. It is changed to jump to the error handling code at fail, to be able to unregister and free the resources allocated on previous iterations. In the second block of code, the input_dev for the current iteration has been allocated, but has not been registered. It has also not been stored in ts->cp_input_info[i].input. Thus on jumping to fail, it will not be freed. In this case, we want to free, but not unregister, so the free for this most recently allocated resource is put before the jump. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression struct input_dev * x; expression ra,rr; position p1,p2; @@ x = input_allocate_device@p1(...) ... when != x = rr when != input_free_device(x,...) when != if (...) { ... input_free_device(x,...) ...} if(...) { ... when != x = ra when forall when != input_free_device(x,...) \(return <+...x...+>; \| return@p2...; \) } @script:python@ p1 << r.p1; p2 << r.p2; @@ cocci.print_main("input_allocate_device",p1) cocci.print_secs("input_free_device",p2) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-11-16Staging: cptm1217: move free under dereferenceDan Carpenter1-1/+1
We dereference "ts" in the printk so move the kfree() down a line. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09Staging: add Synaptics TM1217 Touchscreen Controller driverRamesh Agarwal1-0/+675
This is submitted as a staging driver because there is a more generic driver "on the way" for all these devices and has been for some time. The intent is that as soon as the general drivers are in the mainstream this one will get any leftovers integrated and then be dumped. Until this unspecified future data at least people can actually use their hardware. As its interface is simply input layer we can do that without pain. Some clean up by Alan Cox - Extract gpio support and IRQ support more sanely - Tidying Signed-off-by: Ramesh Agarwal <ramesh.agarwal@intel.com> [avoid deference NULL ts if kzalloc fails] [finger_touched may be used uninitialized] [fix missing sync which confused twm] Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>