net, netrom: convert nr_neigh.refcount from atomic_t to refcount_t
[linux-2.6-microblaze.git] / include / net / netrom.h
index 110350a..cecb4fd 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/list.h>
 #include <linux/slab.h>
 #include <net/sock.h>
+#include <linux/refcount.h>
 
 #define        NR_NETWORK_LEN                  15
 #define        NR_TRANSPORT_LEN                5
@@ -93,7 +94,7 @@ struct nr_neigh {
        unsigned short          count;
        unsigned int            number;
        unsigned char           failed;
-       atomic_t                refcount;
+       refcount_t              refcount;
 };
 
 struct nr_route {
@@ -128,11 +129,11 @@ static __inline__ void nr_node_put(struct nr_node *nr_node)
 }
 
 #define nr_neigh_hold(__nr_neigh) \
-       atomic_inc(&((__nr_neigh)->refcount))
+       refcount_inc(&((__nr_neigh)->refcount))
 
 static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh)
 {
-       if (atomic_dec_and_test(&nr_neigh->refcount)) {
+       if (refcount_dec_and_test(&nr_neigh->refcount)) {
                if (nr_neigh->ax25)
                        ax25_cb_put(nr_neigh->ax25);
                kfree(nr_neigh->digipeat);