[PATCH] Input: rohm_bu21023 - fix handling of retrying firmware update

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE3858d

2 messages, 2 authors, 2016-01-07 · open the first message on its own page

[PATCH] Input: rohm_bu21023 - fix handling of retrying firmware update

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2016-01-06 22:51:20

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

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 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);
-- 
2.6.0.rc2.230.g3dd15c0


-- 
Dmitry

Re: [PATCH] Input: rohm_bu21023 - fix handling of retrying firmware update

From: Yuasa Yoichi <hidden>
Date: 2016-01-07 10:12:04

Hi Dmitry,

Thank you for fixing it.

Acked-by:Yoichi Yuasa [off-list ref]

2016-01-07 7:51 GMT+09:00 Dmitry Torokhov [off-list ref]:
quoted hunk
Because of the wrong condition we'd never retry firmware update.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 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);
--
2.6.0.rc2.230.g3dd15c0


--
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help