diff options
author | Antonio Quartulli <ordex@autistici.org> | 2011-04-20 09:52:56 +0200 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-05-01 22:49:03 +0200 |
commit | 5f657ec0d2103571a31707711926b443a27b0c66 (patch) | |
tree | 573b6740dffb1ad7891d6e04027e12c038e6bd28 /net/batman-adv/main.h | |
parent | b5a6f69c5ca024bea43496d517c3b7ccfdb084a6 (diff) | |
download | linux-5f657ec0d2103571a31707711926b443a27b0c66.tar.gz linux-5f657ec0d2103571a31707711926b443a27b0c66.tar.bz2 linux-5f657ec0d2103571a31707711926b443a27b0c66.zip |
batman-adv: Move definition of atomic_dec_not_zero() into main.h
atomic_dec_not_zero() is very useful and it is currently defined
multiple times. So it is possible to move it in main.h
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r-- | net/batman-adv/main.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index dc248697de71..ace72852ed7b 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -175,4 +175,6 @@ static inline int compare_eth(void *data1, void *data2) return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0); } +#define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0) + #endif /* _NET_BATMAN_ADV_MAIN_H_ */ |