Re: [PATCH] regmap: add regmap_debugfs_exit as devres action
From: Mark Brown
Date: Mon May 22 2017 - 07:33:41 EST
On Fri, May 19, 2017 at 11:36:00PM -0700, Stefan Agner wrote:
> The case I observed this is when reprobing
> drivers/pinctrl/freescale/pinctrl-imx.c. In this driver
> regmap_attach_dev is used in imx_pinctrl_probe. When the driver gets
> removed and probed again, the above warning appears since the debugfs
> entries have not been removed in between...
There's a jump somewhere between the problem you're reporting here and
devres being a fix - surely the problem here is that we're not cleaning
things up properly on destruction of the regmap?
> Afaics, at least for external users, using devres for debugfs makes
> sense since regmap (m) is already using devres...
We should be able to destroy a regmap separately to removal of a device.
If we're requiring managed access something is wrong.
> We can drop this change, but then we have to add a private version of
> regmap_attach_dev which does not add resource managed cleanup of
> regmap_debugfs_exit...
I'm sorry but I'm still not following the logic here.
Attachment:
signature.asc
Description: PGP signature