Skip to contentSkip to conversation

Input: rohm_bu21023 - fix handling of retrying firmware update

PATCH In review Dmitry Torokhov 2 participants 2 messages Jan 6, 2016 – Jan 7, 2016

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: rohm_bu21023 - fix handling of retrying firmware update

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

---
 drivers/input/touchscreen/rohm_bu21023.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/rohm_bu21023.c +1 -1
index ba6024f..611156a 100644
@@ -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);
Signature · 5 lines
2.6.0.rc2.230.g3dd15c0


-- 
Dmitry
Acked-by on v1 1/1
#1 lore raw

Hi Dmitry,

Thank you for fixing it.

2016-01-07 7:51 GMT+09:00 Dmitry Torokhov <[email protected]>:

Quoted 27 lines

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

---
 drivers/input/touchscreen/rohm_bu21023.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/rohm_bu21023.c +1 -2
index ba6024f..611156a 100644
@@ -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