aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-03-20 22:32:28 -0800
committerDavid S. Miller <davem@davemloft.net>2006-03-20 22:32:28 -0800
commit153330618691694af64f39fb56c9de051862380e (patch)
tree45ccb622bf0d13f6a0a663ba8af39f9dc2c9122e /include
parent2d0817d11eaec57435feb61493331a763f732a2b (diff)
[NET]: dev_put/dev_hold cleanup
Get rid of the old __dev_put macro that is just a hold over from pre 2.6 kernel. And turn dev_hold into an inline instead of a macro. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h6
1 files changed, 4 insertions, 2 deletions
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