Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1573417pxb; Mon, 8 Mar 2021 00:30:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwz6tRpHE1Wv+RXeBT3vHNK5sCUGZV3rrDSfJEP833Jz70RTm3N73hXDsqa5z2bOuAHO8rd X-Received: by 2002:a05:6402:8c2:: with SMTP id d2mr21541352edz.4.1615192215390; Mon, 08 Mar 2021 00:30:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615192215; cv=none; d=google.com; s=arc-20160816; b=iihqsjLd/9KV7Nzgsr8p2Q9cjr98LGJwRja59UX3js02zSdctjDg9Wcq8S7ZZU/LOT 9C3HOEdWs4/hgASQkKX1xuOtWRm07CZch3M/t69wHAudZTndgPdd4AJmg+lxoVFoM14I 3Xo6nTC8P2fRmao2fYPJpbpdbn8x9gV+pxf3F2HQf9Nv4eEcmtM2ppU9msjLdWudixqt NT+5qaVnOVDSIpLDVAjfE5Cuhd3f6Z0lr3mIIuny1UQLqIHartBMFv6T8Y3yvqUSpxlR PJtP7Vewxt8ROH4pWWCascvycqfk2BJNis3rX1nAKtK60A0IeHKb5zoJeAMyVMaNkaXA wMkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YkatKMOs5Ojr3e0xhohDmDg5ISCmQBTzzGvByeNnM6c=; b=G9ZVddIOeWj8CyWIlypkLzkHOjgqItuwmH/hGFbjMrALtM882Wq60MwdkSkaGMxf7k ELR+S5YEcb3hcdqMxbuwaaF75uMHdDTe2SKMTNr9epaPKdXZNa8yS9xXh2pLx1luJEdv gvinRgw6vWkj5laFaSqBkqRZlA0xQstITLlKpnXKFZxoMUYg9oVr4iCwVZV5SQpAPddX ESD4QSg+AxSULiK6Gc1LWczR9UNdJalxonlsmTlpst3DzRuKW62ReRgf2db42MACK0yt QylXIOxzsMDdyyFePevxKZN6TdKOkWC9p31FkmzLD7gHn4G0Fll/DVAg9L88S+xL57l2 YDUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qk3si6611255ejb.638.2021.03.08.00.29.52; Mon, 08 Mar 2021 00:30:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231589AbhCGWX1 (ORCPT + 99 others); Sun, 7 Mar 2021 17:23:27 -0500 Received: from aposti.net ([89.234.176.197]:34036 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231388AbhCGWWv (ORCPT ); Sun, 7 Mar 2021 17:22:51 -0500 From: Paul Cercueil To: Dmitry Torokhov Cc: od@zcrc.me, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH v3 1/3] input: gpio-keys: Remove extra call to input_sync Date: Sun, 7 Mar 2021 22:22:38 +0000 Message-Id: <20210307222240.380583-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The input_sync() function is already called after the loop in gpio_keys_report_state(), so it does not need to be called after each iteration within gpio_keys_gpio_report_event(). Signed-off-by: Paul Cercueil --- Notes: v2: Keep the input_sync() within gpio_keys_report_state() so that it's not called at every iteration of the loop. v3: No change drivers/input/keyboard/gpio_keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 77bac4ddf324..7fcb2c35c5cc 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -373,7 +373,6 @@ static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata) } else { input_event(input, type, *bdata->code, state); } - input_sync(input); } static void gpio_keys_gpio_work_func(struct work_struct *work) @@ -382,6 +381,7 @@ static void gpio_keys_gpio_work_func(struct work_struct *work) container_of(work, struct gpio_button_data, work.work); gpio_keys_gpio_report_event(bdata); + input_sync(bdata->input); if (bdata->button->wakeup) pm_relax(bdata->input->dev.parent); -- 2.30.1