diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index b825be201bce..950dc55e5192 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -712,8 +712,10 @@ static inline void dev_put(struct net_device *dev) | |||
712 | atomic_dec(&dev->refcnt); | 712 | atomic_dec(&dev->refcnt); |
713 | } | 713 | } |
714 | 714 | ||
715 | #define __dev_put(dev) atomic_dec(&(dev)->refcnt) | 715 | static inline void dev_hold(struct net_device *dev) |
716 | #define dev_hold(dev) atomic_inc(&(dev)->refcnt) | 716 | { |
717 | atomic_inc(&dev->refcnt); | ||
718 | } | ||
717 | 719 | ||
718 | /* Carrier loss detection, dial on demand. The functions netif_carrier_on | 720 | /* Carrier loss detection, dial on demand. The functions netif_carrier_on |
719 | * and _off may be called from IRQ context, but it is caller | 721 | * and _off may be called from IRQ context, but it is caller |