summaryrefslogtreecommitdiff
path: root/drivers/firewire/core-topology.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-08-01 11:26:29 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-08-01 11:26:29 +0900
commit3593b38a1367c3b57e986b0d2a9b6ceb84ec44ce (patch)
treec83a8344c6b6a116c8c22dfaedbd45dd4f9d60f4 /drivers/firewire/core-topology.c
parent9b6ad6a0115e9a35da65abdc973b80539f983c26 (diff)
firewire: core: utilize kref to maintain fw_node with reference counting
Current implementation directly uses refcount_t to maintain the life time of fw_node, while kref is available for the same purpose. This commit replaces the implementation with kref. Link: https://lore.kernel.org/r/20240801022629.31857-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/core-topology.c')
-rw-r--r--drivers/firewire/core-topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c
index b4e637aa6932..46e6eb287d24 100644
--- a/drivers/firewire/core-topology.c
+++ b/drivers/firewire/core-topology.c
@@ -39,7 +39,7 @@ static struct fw_node *fw_node_create(u32 sid, int port_count, int color)
node->initiated_reset = phy_packet_self_id_zero_get_initiated_reset(sid);
node->port_count = port_count;
- refcount_set(&node->ref_count, 1);
+ kref_init(&node->kref);
INIT_LIST_HEAD(&node->link);
return node;