提交 9ddced16 编写于 作者: J Jean Delvare 提交者: Jean Delvare

i2c: Limit locking scope in i2c_detach_client

We only need to hold adapter->clist_lock when we touch the client list.
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 86ec5ec8
......@@ -768,9 +768,10 @@ int i2c_detach_client(struct i2c_client *client)
mutex_lock(&adapter->clist_lock);
list_del(&client->list);
mutex_unlock(&adapter->clist_lock);
init_completion(&client->released);
device_unregister(&client->dev);
mutex_unlock(&adapter->clist_lock);
wait_for_completion(&client->released);
out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册