diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2015-12-17 16:47:42 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-12-17 17:11:54 -0800 |
commit | 5d655b35466835c6bb8774122db95ecb4e18888d (patch) | |
tree | 4745dc9ca6b54dc7117ebcc4e102e777be3ab1ff | |
parent | 5ab09d6a8f6406134085fb3f30ab61968c6f1ddf (diff) | |
download | op-kernel-dev-5d655b35466835c6bb8774122db95ecb4e18888d.zip op-kernel-dev-5d655b35466835c6bb8774122db95ecb4e18888d.tar.gz |
Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send
Use goodix_i2c_write_u8 instead of i2c_master_send to simplify code.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Tested-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Aleksei Mamlin <mamlinav@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/touchscreen/goodix.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 34ed686..0acefe4 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -277,16 +277,11 @@ static void goodix_process_events(struct goodix_ts_data *ts) */ static irqreturn_t goodix_ts_irq_handler(int irq, void *dev_id) { - static const u8 end_cmd[] = { - GOODIX_READ_COOR_ADDR >> 8, - GOODIX_READ_COOR_ADDR & 0xff, - 0 - }; struct goodix_ts_data *ts = dev_id; goodix_process_events(ts); - if (i2c_master_send(ts->client, end_cmd, sizeof(end_cmd)) < 0) + if (goodix_i2c_write_u8(ts->client, GOODIX_READ_COOR_ADDR, 0) < 0) dev_err(&ts->client->dev, "I2C write end_cmd error\n"); return IRQ_HANDLED; |