Skip to content

Commit b10a03d

Browse files
hubpavhubmartin
authored andcommitted
Apply 1 suggestion(s) to 1 file(s)
Signed-off-by: Martin Hubáček <[email protected]>
1 parent a448e8a commit b10a03d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ctr_s1/ctr_s1.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,8 @@ static void work_handler(struct k_work *work)
802802

803803
uint16_t reg_irq0 = 0;
804804

805-
int repeat = 8;
806-
while (repeat--) {
805+
/* Repeat read in case of I2C error */
806+
for (int i = 0; i < 8; i++) {
807807
ret = read(data->dev, REG_IRQ0, &reg_irq0);
808808
if (ret) {
809809
k_mutex_unlock(&data->lock);

0 commit comments

Comments
 (0)