]> www.infradead.org Git - users/dwmw2/linux.git/commit
firewire: core: use guard macro to access to IDR for fw_device
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 5 Aug 2024 08:53:57 +0000 (17:53 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 5 Aug 2024 08:53:57 +0000 (17:53 +0900)
commit2a6a58f06bd5d123a5b248a565b90b5df26c9ea8
tree500976800667fe512966406bef21d3cc01f3620c
parenteade1e1ba2236f8f51e357a690ca70a41fe34d2d
firewire: core: use guard macro to access to IDR for fw_device

The core function maintains the instance of fw_device structure by IDR.
The concurrent access to IDR is protected by static read/write semaphore.
The semaphore is also utilized to protect concurrent access to the
content of configuration ROM cached to the instance so that the cache is
swapped to the latest one.

This commit uses guard macro to maintain the mutex.

Link: https://lore.kernel.org/r/20240805085408.251763-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-cdev.c
drivers/firewire/core-device.c