[RFC PATCH 2/3] ASoC: Intel: bdw-rt5677: fix module load/unload issues

Mark Brown broonie at kernel.org
Thu Mar 5 14:59:08 CET 2020


On Thu, Mar 05, 2020 at 07:47:47AM -0600, Pierre-Louis Bossart wrote:
> On 3/5/20 7:36 AM, Mark Brown wrote:

> > In what way are the dependencies not well managed and why aren't we
> > requesting the GPIO on device model probe anyway?

> there are a couple of machine drivers where the gpios are requested from the
> machine driver. I have no idea what it is done this way, maybe the codec
> exposes a gpiochip that's used later? I was hoping that Andy can help, I
> don't fully get the acpi mapping and all.

This doesn't answer the question: why is the machine driver not
requesting the GPIO on device model probe?

> The issue happens when running our test scripts, which do a set a rmmod in a
> specific order: rmmod of the machine driver, then doing an rmmod of the
> codec driver. Somehow the second fails with the 'module in use error'.

> It's probably because the devm_ release does not happen when the card is
> unregistered and the machine driver resources released since we use the
> component device. There might very well be a bug somewhere in the devm_
> handling, I just don't have a clue how to debug this - and the .exit() makes
> sense regardless in other cases unrelated to GPIOs.

So you've removed the driver which will have unbound the device but devm
actions don't seem to have fired?  That seems worrying...
-------------- 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/20200305/84f4fbc0/attachment.sig>


More information about the Alsa-devel mailing list