Commit 4fc57876 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] m88ds3103: fix possible i2c deadlock

Adapter is locked by I2C core already. Use unlocked i2c_transfer()
version __i2c_transfer() to avoid deadlock.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent eafa2ad6
...@@ -1159,7 +1159,7 @@ static int m88ds3103_select(struct i2c_adapter *adap, void *mux_priv, u32 chan) ...@@ -1159,7 +1159,7 @@ static int m88ds3103_select(struct i2c_adapter *adap, void *mux_priv, u32 chan)
mutex_lock(&priv->i2c_mutex); mutex_lock(&priv->i2c_mutex);
/* open tuner I2C repeater for 1 xfer, closes automatically */ /* open tuner I2C repeater for 1 xfer, closes automatically */
ret = i2c_transfer(priv->i2c, gate_open_msg, 1); ret = __i2c_transfer(priv->i2c, gate_open_msg, 1);
if (ret != 1) { if (ret != 1) {
dev_warn(&priv->i2c->dev, "%s: i2c wr failed=%d\n", dev_warn(&priv->i2c->dev, "%s: i2c wr failed=%d\n",
KBUILD_MODNAME, ret); KBUILD_MODNAME, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment