aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-topology.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-topology.h')
-rw-r--r--drivers/firewire/fw-topology.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/firewire/fw-topology.h b/drivers/firewire/fw-topology.h
index addb9f8ea776..3c497bb4fae4 100644
--- a/drivers/firewire/fw-topology.h
+++ b/drivers/firewire/fw-topology.h
@@ -19,6 +19,11 @@
19#ifndef __fw_topology_h 19#ifndef __fw_topology_h
20#define __fw_topology_h 20#define __fw_topology_h
21 21
22#include <linux/list.h>
23#include <linux/slab.h>
24
25#include <asm/atomic.h>
26
22enum { 27enum {
23 FW_NODE_CREATED, 28 FW_NODE_CREATED,
24 FW_NODE_UPDATED, 29 FW_NODE_UPDATED,
@@ -51,26 +56,22 @@ struct fw_node {
51 struct fw_node *ports[0]; 56 struct fw_node *ports[0];
52}; 57};
53 58
54static inline struct fw_node * 59static inline struct fw_node *fw_node_get(struct fw_node *node)
55fw_node_get(struct fw_node *node)
56{ 60{
57 atomic_inc(&node->ref_count); 61 atomic_inc(&node->ref_count);
58 62
59 return node; 63 return node;
60} 64}
61 65
62static inline void 66static inline void fw_node_put(struct fw_node *node)
63fw_node_put(struct fw_node *node)
64{ 67{
65 if (atomic_dec_and_test(&node->ref_count)) 68 if (atomic_dec_and_test(&node->ref_count))
66 kfree(node); 69 kfree(node);
67} 70}
68 71
69void 72struct fw_card;
70fw_destroy_nodes(struct fw_card *card); 73void fw_destroy_nodes(struct fw_card *card);
71
72int
73fw_compute_block_crc(u32 *block);
74 74
75int fw_compute_block_crc(u32 *block);
75 76
76#endif /* __fw_topology_h */ 77#endif /* __fw_topology_h */