aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/e1000_main.c2
-rw-r--r--include/linux/netdevice.h6
-rw-r--r--net/ipv4/igmp.c2
-rw-r--r--net/ipv4/ipmr.c4
-rw-r--r--net/sched/sch_generic.c2
5 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index f39de16e6b9..49cd096a3c3 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -920,7 +920,7 @@ e1000_remove(struct pci_dev *pdev)
unregister_netdev(netdev);
#ifdef CONFIG_E1000_NAPI
for (i = 0; i < adapter->num_rx_queues; i++)
- __dev_put(&adapter->polling_netdev[i]);
+ dev_put(&adapter->polling_netdev[i]);
#endif
if (!e1000_check_phy_reset_block(&adapter->hw))
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index b825be201bc..950dc55e519 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -712,8 +712,10 @@ static inline void dev_put(struct net_device *dev)
atomic_dec(&dev->refcnt);
}
-#define __dev_put(dev) atomic_dec(&(dev)->refcnt)
-#define dev_hold(dev) atomic_inc(&(dev)->refcnt)
+static inline void dev_hold(struct net_device *dev)
+{
+ atomic_inc(&dev->refcnt);
+}
/* Carrier loss detection, dial on demand. The functions netif_carrier_on
* and _off may be called from IRQ context, but it is caller
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 3ec502f19da..d512239a147 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1382,7 +1382,7 @@ static struct in_device * ip_mc_find_dev(struct ip_mreqn *imr)
dev = ip_dev_find(imr->imr_address.s_addr);
if (!dev)
return NULL;
- __dev_put(dev);
+ dev_put(dev);
}
if (!dev && !ip_route_output_key(&rt, &fl)) {
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 5c94c222e3f..717ab7d6d7b 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -415,10 +415,10 @@ static int vif_add(struct vifctl *vifc, int mrtsock)
return -ENOBUFS;
break;
case 0:
- dev=ip_dev_find(vifc->vifc_lcl_addr.s_addr);
+ dev = ip_dev_find(vifc->vifc_lcl_addr.s_addr);
if (!dev)
return -EADDRNOTAVAIL;
- __dev_put(dev);
+ dev_put(dev);
break;
default:
return -EINVAL;
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 99ceb91f015..31eb83717c2 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -234,7 +234,7 @@ static void dev_watchdog_down(struct net_device *dev)
{
spin_lock_bh(&dev->xmit_lock);
if (del_timer(&dev->watchdog_timer))
- __dev_put(dev);
+ dev_put(dev);
spin_unlock_bh(&dev->xmit_lock);
}