Skip to content

Commit

Permalink
[ATM]: attempt to autoload atm drivers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mitchell Blank Jr authored and David S. Miller committed Nov 30, 2005
1 parent e91a735 commit 50accc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/atm/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion net/atm/resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 50accc9

Please sign in to comment.