[for,4.1.15-ltsi-rc2] Input: rohm_bu21023 - fix handling of retrying
diff mbox

Message ID 20160115215454.188d9afdf87363204a350eaa@linux-mips.org
State New
Headers show

Commit Message

Yoichi Yuasa Jan. 15, 2016, 12:54 p.m. UTC
Hi Greg,

This is a fix for rohm_bu21023. It has been picked from mainline.

From 415a249f88fd263bed0f7cca86ecde8c57aba9dc Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Wed, 6 Jan 2016 14:44:02 -0800
Subject: [PATCH] Input: rohm_bu21023 - fix handling of retrying
 firmware update

Because of the wrong condition we'd never retry firmware update.

Acked-by: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/touchscreen/rohm_bu21023.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Feb. 1, 2016, 8:33 p.m. UTC | #1
On Fri, Jan 15, 2016 at 09:54:54PM +0900, Yoichi Yuasa wrote:
> Hi Greg,
> 
> This is a fix for rohm_bu21023. It has been picked from mainline.
> 
> >From 415a249f88fd263bed0f7cca86ecde8c57aba9dc Mon Sep 17 00:00:00 2001
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Date: Wed, 6 Jan 2016 14:44:02 -0800
> Subject: [PATCH] Input: rohm_bu21023 - fix handling of retrying
>  firmware update

Now applied, thanks,

greg k-h

Patch
diff mbox

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);