The pointer 'input' is being initialized with ts->ts_input and this
value is not being read as it is updated a few lines later with the
return value from the call to devm_input_allocate_device. Remove the
redundant initialization assignment. Cleans up clang warning:
drivers/input/touchscreen/mxs-lradc-ts.c:587:20: warning: Value Xi
stored to 'input' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Fixes the following sparse warning:
drivers/input/touchscreen/mxs-lradc-ts.c:33:12: warning:
symbol 'mxs_lradc_ts_irq_names' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
[dtor: changed to static const char * const]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Function devm_ioremap() will return a NULL pointer on failure. However,
in function mxs_lradc_ts_probe(), its return value is checked with
IS_ERR(), which cannot detect the exceptional case.
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
platform_get_resource() may fail, so we should better do a NULL check
and return error on failure.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
These tests are meaningless as is because "adapt" can't possibly be both
less than 1 and greater than 32.
Fixes: d81ca730e3 ("input: touchscreen: mxs-lradc: Add support for touchscreen")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>