summaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1.c
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@informatik.tu-chemnitz.de>2013-05-26 20:06:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-03 14:09:14 -0700
commit8d7bda51888d14c07cbebacc5a10be776477bb63 (patch)
treed127eacb0e8961bbafb5bb2b02e0c2c4b008a78e /drivers/w1/w1.c
parenta4b05d1262c1f79ff07e9baceccbf3398846b8c0 (diff)
downloadlinux-8d7bda51888d14c07cbebacc5a10be776477bb63.tar.bz2
w1: add family based automatic module loading
This patch allows the 1-wire bus to autoload the corresponding module for each slave being attached. This works similar to bluetooth protocols. Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r--drivers/w1/w1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 7ce277d2bb67..0459df843c58 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -680,6 +680,8 @@ static int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
atomic_set(&sl->refcnt, 0);
init_completion(&sl->released);
+ request_module("w1-family-0x%0x", rn->family);
+
spin_lock(&w1_flock);
f = w1_family_registered(rn->family);
if (!f) {