summaryrefslogtreecommitdiff
path: root/drivers/firewire/core-iso.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-08-05 17:54:05 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-08-05 17:54:05 +0900
commit27310d5616227c2ba8c0cedc5cdbe236042738b7 (patch)
tree55414745b136e95ef040cbd6465bc540330ce940 /drivers/firewire/core-iso.c
parentd320bac904f9e3a0d1af0c314b768fb1f545704e (diff)
downloadlinux-27310d5616227c2ba8c0cedc5cdbe236042738b7.tar.gz
linux-27310d5616227c2ba8c0cedc5cdbe236042738b7.tar.bz2
linux-27310d5616227c2ba8c0cedc5cdbe236042738b7.zip
firewire: core: use guard macro to maintain properties of fw_card
The core functions uses spinlock in instance of fw_card structure to protect concurrent access to properties in the instance. This commit uses guard macro to maintain the spinlock. Link: https://lore.kernel.org/r/20240805085408.251763-15-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/core-iso.c')
-rw-r--r--drivers/firewire/core-iso.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c
index b3eda38a36f3..101433b8bb51 100644
--- a/drivers/firewire/core-iso.c
+++ b/drivers/firewire/core-iso.c
@@ -375,9 +375,8 @@ void fw_iso_resource_manage(struct fw_card *card, int generation,
u32 channels_lo = channels_mask >> 32; /* channels 63...32 */
int irm_id, ret, c = -EINVAL;
- spin_lock_irq(&card->lock);
- irm_id = card->irm_node->node_id;
- spin_unlock_irq(&card->lock);
+ scoped_guard(spinlock_irq, &card->lock)
+ irm_id = card->irm_node->node_id;
if (channels_hi)
c = manage_channel(card, irm_id, generation, channels_hi,