Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Daniel Wagner and committed by
Wolfram Sang
0268263f fea03a6a

+3 -3
+3 -3
drivers/i2c/busses/i2c-meson.c
··· 211 meson_i2c_add_token(i2c, TOKEN_STOP); 212 } else { 213 i2c->state = STATE_IDLE; 214 - complete_all(&i2c->done); 215 } 216 } 217 ··· 238 dev_dbg(i2c->dev, "error bit set\n"); 239 i2c->error = -ENXIO; 240 i2c->state = STATE_IDLE; 241 - complete_all(&i2c->done); 242 goto out; 243 } 244 ··· 269 break; 270 case STATE_STOP: 271 i2c->state = STATE_IDLE; 272 - complete_all(&i2c->done); 273 break; 274 case STATE_IDLE: 275 break;
··· 211 meson_i2c_add_token(i2c, TOKEN_STOP); 212 } else { 213 i2c->state = STATE_IDLE; 214 + complete(&i2c->done); 215 } 216 } 217 ··· 238 dev_dbg(i2c->dev, "error bit set\n"); 239 i2c->error = -ENXIO; 240 i2c->state = STATE_IDLE; 241 + complete(&i2c->done); 242 goto out; 243 } 244 ··· 269 break; 270 case STATE_STOP: 271 i2c->state = STATE_IDLE; 272 + complete(&i2c->done); 273 break; 274 case STATE_IDLE: 275 break;