提交 5d655b35 编写于 作者: I Irina Tirdea 提交者: Dmitry Torokhov

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: NIrina Tirdea <irina.tirdea@intel.com>
Tested-by: NBastien Nocera <hadess@hadess.net>
Tested-by: NAleksei Mamlin <mamlinav@gmail.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 5ab09d6a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册