Commit 50accc9c authored by Mitchell Blank Jr's avatar Mitchell Blank Jr Committed by David S. Miller

[ATM]: attempt to autoload atm drivers

From: Mitchell Blank Jr <mitch@sfgoth.com>
Signed-off-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e91a7356
...@@ -424,7 +424,7 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci) ...@@ -424,7 +424,7 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci)
vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) vcc->qos.rxtp.traffic_class == ATM_ANYCLASS)
return -EINVAL; return -EINVAL;
if (likely(itf != ATM_ITF_ANY)) { 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 { } else {
dev = NULL; dev = NULL;
spin_lock(&atm_dev_lock); spin_lock(&atm_dev_lock);
......
...@@ -245,7 +245,8 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg) ...@@ -245,7 +245,8 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg)
if (get_user(number, &sioc->number)) if (get_user(number, &sioc->number))
return -EFAULT; return -EFAULT;
if (!(dev = atm_dev_lookup(number))) if (!(dev = try_then_request_module(atm_dev_lookup(number),
"atm-device-%d", number)))
return -ENODEV; return -ENODEV;
switch (cmd) { switch (cmd) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment