pinctrl: cirrus: madera-core: Use devm_pinctrl_register_mappings()
authorThomas Richard <thomas.richard@bootlin.com>
Mon, 9 Jun 2025 11:51:15 +0000 (13:51 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 10 Jun 2025 12:44:42 +0000 (14:44 +0200)
commit90256033c11028a57437b145449c0dab196183b9
treeb2a5adb1440c0ec19f14c3f106bfd05e06a9a797
parent86491c2b99e5adbb56d76286d6668effb36d3c90
pinctrl: cirrus: madera-core: Use devm_pinctrl_register_mappings()

Use devm_pinctrl_register_mappings(), so the mappings are automatically
unregistered by the core. If pinctrl_enable() failed during the probe,
pinctrl_mappings were not freed. Now it is done by the core.

Fixes: 218d72a77b0b ("pinctrl: madera: Add driver for Cirrus Logic Madera codecs")
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/20250609-pinctrl-madera-devm-pinctrl-register-mappings-v1-1-ba2c2822cf6c@bootlin.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/cirrus/pinctrl-madera-core.c