提交 50accc9c 编写于 作者: M Mitchell Blank Jr 提交者: David S. Miller

[ATM]: attempt to autoload atm drivers

From: Mitchell Blank Jr <mitch@sfgoth.com>
Signed-off-by: NChas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e91a7356
......@@ -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);
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册