From: Mitchell Blank Jr Date: Wed, 30 Nov 2005 00:15:18 +0000 (-0800) Subject: [ATM]: attempt to autoload atm drivers X-Git-Tag: v2.6.15-rc4~4^2~11^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50accc9c428273501dd2a6295c84a533dd1fe645;p=linux-2.6 [ATM]: attempt to autoload atm drivers From: Mitchell Blank Jr Signed-off-by: Chas Williams Signed-off-by: David S. Miller --- diff --git a/net/atm/common.c b/net/atm/common.c index 83454e1231..db9318fc60 100644 --- a/net/atm/common.c +++ b/net/atm/common.c @@ -424,7 +424,7 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci) vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) return -EINVAL; if (likely(itf != ATM_ITF_ANY)) { - dev = atm_dev_lookup(itf); + dev = try_then_request_module(atm_dev_lookup(itf), "atm-device-%d", itf); } else { dev = NULL; spin_lock(&atm_dev_lock); diff --git a/net/atm/resources.c b/net/atm/resources.c index 415d2615d4..35f3ceb768 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c @@ -245,7 +245,8 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg) if (get_user(number, &sioc->number)) return -EFAULT; - if (!(dev = atm_dev_lookup(number))) + if (!(dev = try_then_request_module(atm_dev_lookup(number), + "atm-device-%d", number))) return -ENODEV; switch (cmd) {