Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ddced16bb901415ac46058a55bb842a7df8cc68
Commit:     9ddced16bb901415ac46058a55bb842a7df8cc68
Parent:     86ec5ec872566dda74848e09904bb5380cab962e
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 27 18:14:51 2008 +0100
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Sun Jan 27 18:14:51 2008 +0100

    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: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/i2c-core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 824f12c..4765a50 100644
--- 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:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to