]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ATM]: attempt to autoload atm drivers
authorMitchell Blank Jr <mitch@sfgoth.com>
Wed, 30 Nov 2005 00:15:18 +0000 (16:15 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2005 00:15:18 +0000 (16:15 -0800)
From: Mitchell Blank Jr <mitch@sfgoth.com>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/atm/common.c
net/atm/resources.c

index 83454e12317d1518562925f0ed27712895db441f..db9318fc6031d4cada723ffff86b65f0125033e6 100644 (file)
@@ -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);
index 415d2615d475fa3c284d4a11cf565408d8c5c385..35f3ceb7686820de3083d037b14e2131ca909712 100644 (file)
@@ -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) {