]> Pileus Git - ~andy/linux/blobdiff - drivers/w1/w1.c
w1 - call request_module with w1 master mutex unlocked
[~andy/linux] / drivers / w1 / w1.c
index 0781217d239647a9639943614e2b78e80c15385b..fa932c2f7d97276b66199eda06b6edb6565208bb 100644 (file)
@@ -716,7 +716,10 @@ static int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
        atomic_set(&sl->refcnt, 0);
        init_completion(&sl->released);
 
+       /* slave modules need to be loaded in a context with unlocked mutex */
+       mutex_unlock(&dev->mutex);
        request_module("w1-family-0x%0x", rn->family);
+       mutex_lock(&dev->mutex);
 
        spin_lock(&w1_flock);
        f = w1_family_registered(rn->family);