OSDN Git Service
(root)
/
android-x86
/
kernel.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
|
history
diff --git
a/drivers/i2c/i2c-core.c
b/drivers/i2c/i2c-core.c
index
824f12c
..
4765a50
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: