netpoll: copy dev name of slaves to struct netpoll

Otherwise we will not see the name of the slave dev in error
message:

[  388.469446] (null):  doesn't support polling, aborting.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
WANG Cong 2011-06-19 16:13:01 -07:00 committed by David S. Miller
parent 9aa3c94ce5
commit cefa9993f1
2 changed files with 2 additions and 0 deletions

View File

@ -1297,6 +1297,7 @@ static inline int slave_enable_netpoll(struct slave *slave)
goto out; goto out;
np->dev = slave->dev; np->dev = slave->dev;
strlcpy(np->dev_name, slave->dev->name, IFNAMSIZ);
err = __netpoll_setup(np); err = __netpoll_setup(np);
if (err) { if (err) {
kfree(np); kfree(np);

View File

@ -243,6 +243,7 @@ int br_netpoll_enable(struct net_bridge_port *p)
goto out; goto out;
np->dev = p->dev; np->dev = p->dev;
strlcpy(np->dev_name, p->dev->name, IFNAMSIZ);
err = __netpoll_setup(np); err = __netpoll_setup(np);
if (err) { if (err) {