diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 13:02:47 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 13:02:47 -0700 |
commit | dfc568e6bc08916f1035af456e4631c47166b5cf (patch) | |
tree | 3c96bdc26687e0f6958e790c8c93c0c6efb6b8d6 /drivers/w1 | |
parent | fdf91dae6f024c6dfee425fe754df6b1957f6c53 (diff) | |
parent | 31d141e3a666269a3b6fcccddb0351caf7454240 (diff) | |
download | op-kernel-dev-dfc568e6bc08916f1035af456e4631c47166b5cf.zip op-kernel-dev-dfc568e6bc08916f1035af456e4631c47166b5cf.tar.gz |
Merge 3.12-rc6 into char-misc-next
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/w1.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index c7c64f1..fa932c2 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -613,6 +613,9 @@ static int w1_bus_notify(struct notifier_block *nb, unsigned long action, sl = dev_to_w1_slave(dev); fops = sl->family->fops; + if (!fops) + return 0; + switch (action) { case BUS_NOTIFY_ADD_DEVICE: /* if the family driver needs to initialize something... */ @@ -713,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); |