diff options
author | Lothar Waßmann <LW@KARO-electronics.de> | 2014-03-28 12:20:08 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-03-28 12:33:02 -0400 |
commit | 1730d81460b929b1f217cb7d9cb193a7b0e58dd9 (patch) | |
tree | 2a72e63db7214eb1e7f8173fb4e5ffef74378b10 /drivers/input/touchscreen/edt-ft5x06.c | |
parent | 703e148875c838c430312da592d7ab3681ab5c81 (diff) |
Input: edt-ft5x06 - several cleanups; no functional change
- remove redundant parens
- remove redundant type casts
- fix mixed tab/space indentation
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/edt-ft5x06.c')
-rw-r--r-- | drivers/input/touchscreen/edt-ft5x06.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 412a85ec9ba5..155ab3ba84ee 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c | |||
@@ -173,7 +173,7 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id) | |||
173 | x = ((buf[0] << 8) | buf[1]) & 0x0fff; | 173 | x = ((buf[0] << 8) | buf[1]) & 0x0fff; |
174 | y = ((buf[2] << 8) | buf[3]) & 0x0fff; | 174 | y = ((buf[2] << 8) | buf[3]) & 0x0fff; |
175 | id = (buf[2] >> 4) & 0x0f; | 175 | id = (buf[2] >> 4) & 0x0f; |
176 | down = (type != TOUCH_EVENT_UP); | 176 | down = type != TOUCH_EVENT_UP; |
177 | 177 | ||
178 | input_mt_slot(tsdata->input, id); | 178 | input_mt_slot(tsdata->input, id); |
179 | input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, down); | 179 | input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, down); |
@@ -257,7 +257,7 @@ static ssize_t edt_ft5x06_setting_show(struct device *dev, | |||
257 | struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); | 257 | struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); |
258 | struct edt_ft5x06_attribute *attr = | 258 | struct edt_ft5x06_attribute *attr = |
259 | container_of(dattr, struct edt_ft5x06_attribute, dattr); | 259 | container_of(dattr, struct edt_ft5x06_attribute, dattr); |
260 | u8 *field = (u8 *)((char *)tsdata + attr->field_offset); | 260 | u8 *field = (u8 *)tsdata + attr->field_offset; |
261 | int val; | 261 | int val; |
262 | size_t count = 0; | 262 | size_t count = 0; |
263 | int error = 0; | 263 | int error = 0; |
@@ -299,7 +299,7 @@ static ssize_t edt_ft5x06_setting_store(struct device *dev, | |||
299 | struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); | 299 | struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); |
300 | struct edt_ft5x06_attribute *attr = | 300 | struct edt_ft5x06_attribute *attr = |
301 | container_of(dattr, struct edt_ft5x06_attribute, dattr); | 301 | container_of(dattr, struct edt_ft5x06_attribute, dattr); |
302 | u8 *field = (u8 *)((char *)tsdata + attr->field_offset); | 302 | u8 *field = (u8 *)tsdata + attr->field_offset; |
303 | unsigned int val; | 303 | unsigned int val; |
304 | int error; | 304 | int error; |
305 | 305 | ||
@@ -479,7 +479,7 @@ static int edt_ft5x06_debugfs_mode_set(void *data, u64 mode) | |||
479 | 479 | ||
480 | if (mode != tsdata->factory_mode) { | 480 | if (mode != tsdata->factory_mode) { |
481 | retval = mode ? edt_ft5x06_factory_mode(tsdata) : | 481 | retval = mode ? edt_ft5x06_factory_mode(tsdata) : |
482 | edt_ft5x06_work_mode(tsdata); | 482 | edt_ft5x06_work_mode(tsdata); |
483 | } | 483 | } |
484 | 484 | ||
485 | mutex_unlock(&tsdata->mutex); | 485 | mutex_unlock(&tsdata->mutex); |
@@ -568,7 +568,6 @@ out: | |||
568 | return error ?: read; | 568 | return error ?: read; |
569 | }; | 569 | }; |
570 | 570 | ||
571 | |||
572 | static const struct file_operations debugfs_raw_data_fops = { | 571 | static const struct file_operations debugfs_raw_data_fops = { |
573 | .open = simple_open, | 572 | .open = simple_open, |
574 | .read = edt_ft5x06_debugfs_raw_data_read, | 573 | .read = edt_ft5x06_debugfs_raw_data_read, |
@@ -614,8 +613,6 @@ edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) | |||
614 | 613 | ||
615 | #endif /* CONFIG_DEBUGFS */ | 614 | #endif /* CONFIG_DEBUGFS */ |
616 | 615 | ||
617 | |||
618 | |||
619 | static int edt_ft5x06_ts_reset(struct i2c_client *client, | 616 | static int edt_ft5x06_ts_reset(struct i2c_client *client, |
620 | int reset_pin) | 617 | int reset_pin) |
621 | { | 618 | { |
@@ -852,8 +849,8 @@ static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops, | |||
852 | edt_ft5x06_ts_suspend, edt_ft5x06_ts_resume); | 849 | edt_ft5x06_ts_suspend, edt_ft5x06_ts_resume); |
853 | 850 | ||
854 | static const struct i2c_device_id edt_ft5x06_ts_id[] = { | 851 | static const struct i2c_device_id edt_ft5x06_ts_id[] = { |
855 | { "edt-ft5x06", 0 }, | 852 | { "edt-ft5x06", 0, }, |
856 | { } | 853 | { /* sentinel */ } |
857 | }; | 854 | }; |
858 | MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id); | 855 | MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id); |
859 | 856 | ||