diff options
Diffstat (limited to 'sound/pci/cs5535audio/cs5535audio.c')
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 76566e7baea0..0ebf6c02b1ef 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c @@ -176,9 +176,10 @@ static int snd_cs5535audio_mixer(struct cs5535audio *cs5535au) static void process_bm0_irq(struct cs5535audio *cs5535au) { u8 bm_stat; - spin_lock(&cs5535au->reg_lock); - bm_stat = cs_readb(cs5535au, ACC_BM0_STATUS); - spin_unlock(&cs5535au->reg_lock); + + scoped_guard(spinlock, &cs5535au->reg_lock) { + bm_stat = cs_readb(cs5535au, ACC_BM0_STATUS); + } if (bm_stat & EOP) { snd_pcm_period_elapsed(cs5535au->playback_substream); } else { @@ -191,9 +192,10 @@ static void process_bm0_irq(struct cs5535audio *cs5535au) static void process_bm1_irq(struct cs5535audio *cs5535au) { u8 bm_stat; - spin_lock(&cs5535au->reg_lock); - bm_stat = cs_readb(cs5535au, ACC_BM1_STATUS); - spin_unlock(&cs5535au->reg_lock); + + scoped_guard(spinlock, &cs5535au->reg_lock) { + bm_stat = cs_readb(cs5535au, ACC_BM1_STATUS); + } if (bm_stat & EOP) snd_pcm_period_elapsed(cs5535au->capture_substream); } |