Re: [PATCH] regmap: add regmap_debugfs_exit as devres action

2017-05-22 Thread Mark Brown
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 th

Re: [PATCH] regmap: add regmap_debugfs_exit as devres action

2017-05-19 Thread Stefan Agner
On 2017-05-19 09:46, Mark Brown wrote: > On Mon, May 15, 2017 at 01:08:27AM -0700, Stefan Agner wrote: > >> Instead of manually cleanup regmap_debugfs_exit, use devres action >> to do the cleanup. This also works for external users of >> regmap_attach_dev. > > Why? It's also not clear to me that

Re: [PATCH] regmap: add regmap_debugfs_exit as devres action

2017-05-19 Thread Mark Brown
On Mon, May 15, 2017 at 01:08:27AM -0700, Stefan Agner wrote: > Instead of manually cleanup regmap_debugfs_exit, use devres action > to do the cleanup. This also works for external users of > regmap_attach_dev. Why? It's also not clear to me that this will work if something creates a regmap, fre

[PATCH] regmap: add regmap_debugfs_exit as devres action

2017-05-15 Thread Stefan Agner
Instead of manually cleanup regmap_debugfs_exit, use devres action to do the cleanup. This also works for external users of regmap_attach_dev. Signed-off-by: Stefan Agner --- The cast is not that pretty, but I found it better than making regmap_debugfs_exit type unsafe... This fixes warnings whe