summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShantanu Jain <shjain@codeaurora.org>2015-07-23 17:35:39 +0530
committerAbinaya P <abinayap@codeaurora.org>2016-07-29 12:18:37 +0530
commit1108a17322ff1be8fe012bee5efebd2c28eb1351 (patch)
tree76233fefbfbe5eab8c125125e46b3de3b78acbe4
parent956d9b1ab3db6c7fef95964f7f6be8860433b74e (diff)
input: ft5x06_ts: clean up the focaltech touchscreen driver
Clean up the focaltech driver by fixing the following checkpatch errors. 1. else is not generally useful after a break or return 2. Possible unnecessary 'out of memory' message 3. Using __devexit is unnecessary 4. Unnecessary space before function pointer arguments This patch is a propagated patch from 3.18 kernel 'commit 2b6ea311a968 ("input: ft5x06_ts: fix checkpatch errors")' Change-Id: I36ed0497c12b0f14e9d7b60c2d8e78729871b8d0 Signed-off-by: Shantanu Jain <shjain@codeaurora.org> Signed-off-by: Abinaya P <abinayap@codeaurora.org>
-rw-r--r--drivers/input/touchscreen/ft5x06_ts.c11
-rw-r--r--include/linux/input/ft5x06_ts.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/input/touchscreen/ft5x06_ts.c b/drivers/input/touchscreen/ft5x06_ts.c
index c9905a4a87df..1b4e9af85572 100644
--- a/drivers/input/touchscreen/ft5x06_ts.c
+++ b/drivers/input/touchscreen/ft5x06_ts.c
@@ -200,8 +200,9 @@ static int ft5x06_handle_touchdata(struct ft5x06_ts_data *data)
pointid = (buf[FT_TOUCH_ID_POS + FT_TOUCH_STEP * i]) >> 4;
if (pointid >= FT_MAX_ID)
break;
- else
- event->touch_point++;
+
+ event->touch_point++;
+
event->x[i] =
(s16) (buf[FT_TOUCH_X_H_POS + FT_TOUCH_STEP * i] & 0x0F) <<
8 | (s16) buf[FT_TOUCH_X_L_POS + FT_TOUCH_STEP * i];
@@ -419,10 +420,8 @@ static int ft5x06_ts_probe(struct i2c_client *client,
}
data = kzalloc(sizeof(struct ft5x06_ts_data), GFP_KERNEL);
- if (!data) {
- dev_err(&client->dev, "Not enough memory\n");
+ if (!data)
return -ENOMEM;
- }
input_dev = input_allocate_device();
if (!input_dev) {
@@ -587,7 +586,7 @@ free_mem:
return err;
}
-static int __devexit ft5x06_ts_remove(struct i2c_client *client)
+static int ft5x06_ts_remove(struct i2c_client *client)
{
struct ft5x06_ts_data *data = i2c_get_clientdata(client);
diff --git a/include/linux/input/ft5x06_ts.h b/include/linux/input/ft5x06_ts.h
index b2fb3c4a56ae..a9577b62cb07 100644
--- a/include/linux/input/ft5x06_ts.h
+++ b/include/linux/input/ft5x06_ts.h
@@ -24,8 +24,8 @@ struct ft5x06_ts_platform_data {
u32 y_max;
u32 irq_gpio;
u32 reset_gpio;
- int (*power_init) (bool);
- int (*power_on) (bool);
+ int (*power_init)(bool);
+ int (*power_on)(bool);
};
#endif