diff options
Diffstat (limited to 'sound/pci/echoaudio/mona_dsp.c')
| -rw-r--r-- | sound/pci/echoaudio/mona_dsp.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/pci/echoaudio/mona_dsp.c b/sound/pci/echoaudio/mona_dsp.c index dce9e57d01c4..9bb6a174745c 100644 --- a/sound/pci/echoaudio/mona_dsp.c +++ b/sound/pci/echoaudio/mona_dsp.c @@ -44,7 +44,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) if (snd_BUG_ON((subdevice_id & 0xfff0) != MONA)) return -ENODEV; - if ((err = init_dsp_comm_page(chip))) { + err = init_dsp_comm_page(chip); + if (err) { dev_err(chip->card->dev, "init_hw - could not initialize DSP comm page\n"); return err; @@ -67,7 +68,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) else chip->dsp_code_to_load = FW_MONA_301_DSP; - if ((err = load_firmware(chip)) < 0) + err = load_firmware(chip); + if (err < 0) return err; chip->bad_board = false; @@ -300,11 +302,6 @@ static int set_input_clock(struct echoaudio *chip, u16 clock) u32 control_reg, clocks_from_dsp; int err; - - /* Prevent two simultaneous calls to switch_asic() */ - if (atomic_read(&chip->opencount)) - return -EAGAIN; - /* Mask off the clock select bits */ control_reg = le32_to_cpu(chip->comm_page->control_register) & GML_CLOCK_CLEAR_MASK; @@ -384,7 +381,7 @@ static int dsp_set_digital_mode(struct echoaudio *chip, u8 mode) return -EINVAL; } - spin_lock_irq(&chip->lock); + guard(spinlock_irq)(&chip->lock); if (incompatible_clock) { /* Switch to 48KHz, internal */ chip->sample_rate = 48000; @@ -416,7 +413,6 @@ static int dsp_set_digital_mode(struct echoaudio *chip, u8 mode) } err = write_control_reg(chip, control_reg, false); - spin_unlock_irq(&chip->lock); if (err < 0) return err; chip->digital_mode = mode; |
