diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-25 19:04:25 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-26 13:54:00 +0100 |
commit | 9bb684442cf48c0e0736f5902f112c4f39ee3677 (patch) | |
tree | cab808d9a391836a7e2f987e10f4ce9b93f84a0f /sound/soc | |
parent | 5afe5bfe243d649aa5118c74317cbcbe85a04cb9 (diff) | |
download | linux-9bb684442cf48c0e0736f5902f112c4f39ee3677.tar.gz linux-9bb684442cf48c0e0736f5902f112c4f39ee3677.tar.bz2 linux-9bb684442cf48c0e0736f5902f112c4f39ee3677.zip |
ASoC: wm0010: Initialise chip state before we register the interrupt
The interrupt handler uses the chip state.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wm0010.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index 780110a15c97..99afc003a084 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -810,7 +810,6 @@ static int wm0010_probe(struct snd_soc_codec *codec) static int __devinit wm0010_spi_probe(struct spi_device *spi) { - unsigned long flags; unsigned long gpio_flags; int ret; int trigger; @@ -877,6 +876,8 @@ static int __devinit wm0010_spi_probe(struct spi_device *spi) return -EINVAL; } + wm0010->state = WM0010_POWER_OFF; + irq = spi->irq; if (wm0010->pdata.irq_flags) trigger = wm0010->pdata.irq_flags; @@ -898,10 +899,6 @@ static int __devinit wm0010_spi_probe(struct spi_device *spi) else wm0010->board_max_spi_speed = 0; - spin_lock_irqsave(&wm0010->irq_lock, flags); - wm0010->state = WM0010_POWER_OFF; - spin_unlock_irqrestore(&wm0010->irq_lock, flags); - ret = snd_soc_register_codec(&spi->dev, &soc_codec_dev_wm0010, wm0010_dai, ARRAY_SIZE(wm0010_dai)); |