diff options
Diffstat (limited to 'sound/ppc/burgundy.c')
| -rw-r--r-- | sound/ppc/burgundy.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sound/ppc/burgundy.c b/sound/ppc/burgundy.c index 4fb990ab2ceb..5d6accce3a72 100644 --- a/sound/ppc/burgundy.c +++ b/sound/ppc/burgundy.c @@ -9,6 +9,7 @@ #include <linux/io.h> #include <linux/init.h> #include <linux/delay.h> +#include <linux/of.h> #include <sound/core.h> #include "pmac.h" #include "burgundy.h" @@ -58,9 +59,8 @@ static unsigned snd_pmac_burgundy_rcw(struct snd_pmac *chip, unsigned addr) { unsigned val = 0; - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + guard(spinlock_irqsave)(&chip->reg_lock); out_le32(&chip->awacs->codec_ctrl, addr + 0x100000); snd_pmac_burgundy_busy_wait(chip); @@ -82,8 +82,6 @@ snd_pmac_burgundy_rcw(struct snd_pmac *chip, unsigned addr) snd_pmac_burgundy_extend_wait(chip); val += ((in_le32(&chip->awacs->codec_stat)>>4) & 0xff) <<24; - spin_unlock_irqrestore(&chip->reg_lock, flags); - return val; } @@ -99,17 +97,14 @@ static unsigned snd_pmac_burgundy_rcb(struct snd_pmac *chip, unsigned int addr) { unsigned val = 0; - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + guard(spinlock_irqsave)(&chip->reg_lock); out_le32(&chip->awacs->codec_ctrl, addr + 0x100000); snd_pmac_burgundy_busy_wait(chip); snd_pmac_burgundy_extend_wait(chip); val += (in_le32(&chip->awacs->codec_stat) >> 4) & 0xff; - spin_unlock_irqrestore(&chip->reg_lock, flags); - return val; } @@ -664,7 +659,7 @@ int snd_pmac_burgundy_init(struct snd_pmac *chip) /* * build burgundy mixers */ - strcpy(chip->card->mixername, "PowerMac Burgundy"); + strscpy(chip->card->mixername, "PowerMac Burgundy"); for (i = 0; i < ARRAY_SIZE(snd_pmac_burgundy_mixers); i++) { err = snd_ctl_add(chip->card, |
