projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86ec5ec
)
i2c: Limit locking scope in i2c_detach_client
author
Jean Delvare
<khali@linux-fr.org>
Sun, 27 Jan 2008 17:14:51 +0000
(18:14 +0100)
committer
Jean Delvare
<khali@hyperion.delvare>
Sun, 27 Jan 2008 17:14:51 +0000
(18:14 +0100)
We only need to hold adapter->clist_lock when we touch the client list.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/i2c-core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/i2c/i2c-core.c
b/drivers/i2c/i2c-core.c
index 824f12c798d6ed2da217158e5b5b610d92369b8f..4765a50d753778ef60463307e16315669e969b85 100644
(file)
--- a/
drivers/i2c/i2c-core.c
+++ b/
drivers/i2c/i2c-core.c
@@
-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: