10 Sep
2018
10 Sep
'18
3:59 p.m.
On Fri, Sep 07, 2018 at 01:00:32AM +0000, Kuninori Morimoto wrote:
@@ -288,8 +288,6 @@ static int au1xac97c_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
snd_soc_unregister_component(&pdev->dev);
WR(ctx, AC97_ENABLE, EN_D); /* clock off, disable */
ac97c_workdata = NULL; /* MDEV */
This will mean that instead of unregistering the component so nothing can use the hardware then disabling the hardware we'll do things the other way around so there's a race where we may break anything that tries to use the driver just as we're unregistring, possibly causing the system to hang or something depending on what happens if you try to access the disabled IPs.