Skip to content

Commit 0268263

Browse files
Daniel WagnerWolfram Sang
authored andcommitted
i2c: meson: Use complete() instead of complete_all()
There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: meson_i2c_xfer_msg() reinit_completion() ... /* Start the transfer */ ... wait_for_completion_timeout() Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
1 parent fea03a6 commit 0268263

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/i2c/busses/i2c-meson.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static void meson_i2c_stop(struct meson_i2c *i2c)
211211
meson_i2c_add_token(i2c, TOKEN_STOP);
212212
} else {
213213
i2c->state = STATE_IDLE;
214-
complete_all(&i2c->done);
214+
complete(&i2c->done);
215215
}
216216
}
217217

@@ -238,7 +238,7 @@ static irqreturn_t meson_i2c_irq(int irqno, void *dev_id)
238238
dev_dbg(i2c->dev, "error bit set\n");
239239
i2c->error = -ENXIO;
240240
i2c->state = STATE_IDLE;
241-
complete_all(&i2c->done);
241+
complete(&i2c->done);
242242
goto out;
243243
}
244244

@@ -269,7 +269,7 @@ static irqreturn_t meson_i2c_irq(int irqno, void *dev_id)
269269
break;
270270
case STATE_STOP:
271271
i2c->state = STATE_IDLE;
272-
complete_all(&i2c->done);
272+
complete(&i2c->done);
273273
break;
274274
case STATE_IDLE:
275275
break;

0 commit comments

Comments
 (0)