diff options
| author | Takashi Sakamoto <[email protected]> | 2024-08-05 08:54:05 +0000 |
|---|---|---|
| committer | Takashi Sakamoto <[email protected]> | 2024-08-05 08:54:05 +0000 |
| commit | 27310d5616227c2ba8c0cedc5cdbe236042738b7 (patch) | |
| tree | 55414745b136e95ef040cbd6465bc540330ce940 /drivers/firewire/core-cdev.c | |
| parent | firewire: core: use guard macro to maintain list of asynchronous transaction (diff) | |
| download | kernel-27310d5616227c2ba8c0cedc5cdbe236042738b7.tar.gz kernel-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/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>
Diffstat (limited to 'drivers/firewire/core-cdev.c')
| -rw-r--r-- | drivers/firewire/core-cdev.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index f32f8667ef2c..672a37fa8343 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -354,7 +354,7 @@ static void fill_bus_reset_event(struct fw_cdev_event_bus_reset *event, { struct fw_card *card = client->device->card; - spin_lock_irq(&card->lock); + guard(spinlock_irq)(&card->lock); event->closure = client->bus_reset_closure; event->type = FW_CDEV_EVENT_BUS_RESET; @@ -364,8 +364,6 @@ static void fill_bus_reset_event(struct fw_cdev_event_bus_reset *event, event->bm_node_id = card->bm_node_id; event->irm_node_id = card->irm_node->node_id; event->root_node_id = card->root_node->node_id; - - spin_unlock_irq(&card->lock); } static void for_each_client(struct fw_device *device, |
