From: Takashi Iwai Date: Wed, 27 Aug 2025 07:29:05 +0000 (+0200) Subject: ALSA: hda/intel: Use guard() for spinlocks X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=cb8fc4337c7e9e8c3431d51c107f32fffd6f2318;p=users%2Fhch%2Fmisc.git ALSA: hda/intel: Use guard() for spinlocks Replace the manual spin lock/unlock pairs with guard() for code simplification. Only code refactoring, and no behavior change. Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20250827072916.31933-26-tiwai@suse.de --- diff --git a/sound/hda/controllers/intel.c b/sound/hda/controllers/intel.c index 1e13678428d2..48c52a207024 100644 --- a/sound/hda/controllers/intel.c +++ b/sound/hda/controllers/intel.c @@ -764,12 +764,11 @@ static void azx_clear_irq_pending(struct azx *chip) struct hdac_bus *bus = azx_bus(chip); struct hdac_stream *s; - spin_lock_irq(&bus->reg_lock); + guard(spinlock_irq)(&bus->reg_lock); list_for_each_entry(s, &bus->stream_list, list) { struct azx_dev *azx_dev = stream_to_azx_dev(s); azx_dev->irq_pending = 0; } - spin_unlock_irq(&bus->reg_lock); } static int azx_acquire_irq(struct azx *chip, int do_disconnect)