]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mfd: cs42l43: Use devres for remove as well
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 5 Dec 2024 11:58:22 +0000 (11:58 +0000)
committerLee Jones <lee@kernel.org>
Tue, 17 Dec 2024 13:17:25 +0000 (13:17 +0000)
commit0f35dc4bd50df4ad3c17a2c53cdccc4cdc5caa9e
treecb498bb90a45adebf8914aca2c81def4d6164a78
parent47dde1a077dcdcd5b9071983a11ec34cf302b943
mfd: cs42l43: Use devres for remove as well

Currently the device is powered down in the remove callback, however
all other clean up is done through devres. The problem here is the
MFD children are cleaned up through devres. As this happens after
the remove callback has run, this leads to the incorrect ordering
where the child remove functions run after the device has been powered
down. Put the power down into devres as well such that everything runs
in the expected order.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20241205115822.2371719-4-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/cs42l43-i2c.c
drivers/mfd/cs42l43-sdw.c
drivers/mfd/cs42l43.c
drivers/mfd/cs42l43.h