Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bb68444 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: wm0010: Initialise chip state before we register the interrupt



The interrupt handler uses the chip state.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5afe5bfe
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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));