aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/core.h')
-rw-r--r--drivers/firewire/core.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h
index e1480ff683d2..c07962ead5e4 100644
--- a/drivers/firewire/core.h
+++ b/drivers/firewire/core.h
@@ -12,7 +12,7 @@
12#include <linux/slab.h> 12#include <linux/slab.h>
13#include <linux/types.h> 13#include <linux/types.h>
14 14
15#include <linux/atomic.h> 15#include <linux/refcount.h>
16 16
17struct device; 17struct device;
18struct fw_card; 18struct fw_card;
@@ -184,7 +184,7 @@ struct fw_node {
184 * local node to this node. */ 184 * local node to this node. */
185 u8 max_depth:4; /* Maximum depth to any leaf node */ 185 u8 max_depth:4; /* Maximum depth to any leaf node */
186 u8 max_hops:4; /* Max hops in this sub tree */ 186 u8 max_hops:4; /* Max hops in this sub tree */
187 atomic_t ref_count; 187 refcount_t ref_count;
188 188
189 /* For serializing node topology into a list. */ 189 /* For serializing node topology into a list. */
190 struct list_head link; 190 struct list_head link;
@@ -197,14 +197,14 @@ struct fw_node {
197 197
198static inline struct fw_node *fw_node_get(struct fw_node *node) 198static inline struct fw_node *fw_node_get(struct fw_node *node)
199{ 199{
200 atomic_inc(&node->ref_count); 200 refcount_inc(&node->ref_count);
201 201
202 return node; 202 return node;
203} 203}
204 204
205static inline void fw_node_put(struct fw_node *node) 205static inline void fw_node_put(struct fw_node *node)
206{ 206{
207 if (atomic_dec_and_test(&node->ref_count)) 207 if (refcount_dec_and_test(&node->ref_count))
208 kfree(node); 208 kfree(node);
209} 209}
210 210