From patchwork Wed Jan 6 22:51:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 7971721 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 391779F1CC for ; Wed, 6 Jan 2016 22:51:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6994120154 for ; Wed, 6 Jan 2016 22:51:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 91FC320149 for ; Wed, 6 Jan 2016 22:51:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110AbcAFWvQ (ORCPT ); Wed, 6 Jan 2016 17:51:16 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:35598 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbcAFWvP (ORCPT ); Wed, 6 Jan 2016 17:51:15 -0500 Received: by mail-pa0-f41.google.com with SMTP id do7so4533355pab.2; Wed, 06 Jan 2016 14:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=pbsTMh5kkMeAvnD2mL9yP0dyuEA5mZzCndUERDNXel0=; b=Ab5Hg511temVPw0nFspyDQLs42nN05Z0OrWNqZJg3VCS2VzctdBN5HNv4NMii8N0XJ fa9v6Kj6MzKGEprfvDTAuw6C8iGLSU+iqVe9WoJib3hDCPAQWpcxndNjZa66aQxiSFTe OOFXjD3UME/9WcyMPVFKK2jVaj9uC2UeLi62E1iyGFCcj6QZ1KNgVQAsVEQppYL9xmEg UB2JslNP9ndE/p0jSOFYmmgWTqpjezGQcVmPrGHaWS2bWZLymwymHruxIwpTIbB8VytK w/uc7onP/J4o6OTX/UDi7kPn9dox2C8E8YS57+ihX+or3D3BzcxTPw9AYa0WeajPTs/i bw4g== X-Received: by 10.66.100.135 with SMTP id ey7mr147522048pab.108.1452120674826; Wed, 06 Jan 2016 14:51:14 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1301:ac2b:3665:f5db:75dd]) by smtp.gmail.com with ESMTPSA id ux2sm143712441pac.46.2016.01.06.14.51.13 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 06 Jan 2016 14:51:13 -0800 (PST) Date: Wed, 6 Jan 2016 14:51:11 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Yoichi Yuasa , linux-kernel@vger.kernel.org Subject: [PATCH] Input: rohm_bu21023 - fix handling of retrying firmware update Message-ID: <20160106225111.GA40396@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Because of the wrong condition we'd never retry firmware update. Signed-off-by: Dmitry Torokhov Acked-by:Yoichi Yuasa --- drivers/input/touchscreen/rohm_bu21023.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/rohm_bu21023.c b/drivers/input/touchscreen/rohm_bu21023.c index ba6024f..611156a 100644 --- a/drivers/input/touchscreen/rohm_bu21023.c +++ b/drivers/input/touchscreen/rohm_bu21023.c @@ -725,7 +725,7 @@ static int rohm_ts_load_firmware(struct i2c_client *client, break; error = -EIO; - } while (++retry >= FIRMWARE_RETRY_MAX); + } while (++retry <= FIRMWARE_RETRY_MAX); out: error2 = i2c_smbus_write_byte_data(client, INT_MASK, INT_ALL);