[alsa-devel] [PATCH v2 07/23] ASoC: au1x: psc-ac97.c: use devm_snd_soc_register_component()
Mark Brown
broonie at kernel.org
Tue Jul 2 14:39:10 CEST 2019
On Fri, Jun 28, 2019 at 01:08:34PM +0900, Kuninori Morimoto wrote:
> @@ -426,8 +426,6 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev)
> {
> struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
>
> - snd_soc_unregister_component(&pdev->dev);
> -
> /* disable PSC completely */
> __raw_writel(0, AC97_CFG(wd));
> wmb(); /* drain writebuffer */
I don't think this is 100% safe - with this change we will turn
off the hardware block before we unregister the component which
means that we might try to interact with it. If we're converting
to devm then we need to be careful the ordering of the removal
won't be affected.
-------------- 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/20190702/c68be923/attachment.sig>
More information about the Alsa-devel
mailing list