From patchwork Thu Oct 8 14:23:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot for Irina Tirdea X-Patchwork-Id: 7353181 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 11B2DBEEA4 for ; Thu, 8 Oct 2015 14:29:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47FBC2078E for ; Thu, 8 Oct 2015 14:29:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70B022081F for ; Thu, 8 Oct 2015 14:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933163AbbJHO3b (ORCPT ); Thu, 8 Oct 2015 10:29:31 -0400 Received: from mga01.intel.com ([192.55.52.88]:8142 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933310AbbJHO1E (ORCPT ); Thu, 8 Oct 2015 10:27:04 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 08 Oct 2015 07:27:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,655,1437462000"; d="scan'208";a="576630542" Received: from itirdea-desk.rb.intel.com ([10.237.104.230]) by FMSMGA003.fm.intel.com with ESMTP; 08 Oct 2015 07:27:01 -0700 From: Irina Tirdea To: Dmitry Torokhov , Bastien Nocera , Aleksei Mamlin , Arnd Bergmann , linux-input@vger.kernel.org Cc: Mark Rutland , Octavian Purdila , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Irina Tirdea Subject: [PATCH v8 5/9] Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send Date: Thu, 8 Oct 2015 17:23:47 +0300 Message-Id: <1444314231-19206-6-git-send-email-irina.tirdea@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444314231-19206-1-git-send-email-irina.tirdea@intel.com> References: <1444314231-19206-1-git-send-email-irina.tirdea@intel.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use goodix_i2c_write_u8 instead of i2c_master_send to simplify code. Signed-off-by: Irina Tirdea --- drivers/input/touchscreen/goodix.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 6314a24..c86c265 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -274,16 +274,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;