[PATCH v2 06/15] ASoC: cs42l42: Remove power if the driver is being removed

Mark Brown broonie at kernel.org
Fri Mar 5 19:49:44 CET 2021


On Fri, Mar 05, 2021 at 05:34:33PM +0000, Lucas Tanure wrote:

> -	/* Hold down reset */
> -	gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
> +	disable_irq(i2c_client->irq);
> +	pm_runtime_suspend(&i2c_client->dev);
> +	pm_runtime_disable(&i2c_client->dev);

You should be unregistering the interrupt, not disabling it - this will
better support any shared IRQ usage that appears and is much, much more
idiomatic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210305/c5805bef/attachment.sig>


More information about the Alsa-devel mailing list