From: stephen hemminger Date: Wed, 24 Jul 2013 18:53:57 +0000 (-0700) Subject: bond: cleanup netpoll code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=10eccb46b521359fa344f63459087df722f0776d;p=openwrt%2Fstaging%2Fblogic.git bond: cleanup netpoll code This started out with fixing a sparse warning, then I realized that the wrapper function bond_netpoll_info could just be removed by rolling it into the enable code. Signed-off-by: Stephen Hemminger Reviewed-by: Jiri Pirko Acked-by: Neil Horman Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index fc10c12bb304..f58435242c50 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1245,12 +1245,6 @@ static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, g } return err; } - -static struct netpoll_info *bond_netpoll_info(struct bonding *bond) -{ - return bond->dev->npinfo; -} - #else static inline int slave_enable_netpoll(struct slave *slave) { @@ -1795,7 +1789,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) bond_set_carrier(bond); #ifdef CONFIG_NET_POLL_CONTROLLER - slave_dev->npinfo = bond_netpoll_info(bond); + slave_dev->npinfo = bond->dev->npinfo; if (slave_dev->npinfo) { if (slave_enable_netpoll(new_slave)) { read_unlock(&bond->lock);