ASoC: codecs: da7218: Fix devm resource leaks across card bind/unbind
component->dev is the underlying I2C device, so resources requested with devm_*(component->dev, ...) in the component .probe are only released when the I2C device is removed, not on card unbind. This leaks the mclk clock, the regulator bulk, the platform data parsed from the device tree and the IRQ on every card bind/unbind cycle. Move the mclk clock and the regulator supplies (pure hardware resources tied to the I2C device) to da7218_i2c_probe() using devm on &i2c->dev. Likewise move the device tree parsing (da7218_of_to_pdata()), which also allocates with devm, to da7218_i2c_probe() and store the result in da7218->pdata; the OF helpers now take a struct device so they no longer depend on the component. Keep the IRQ in the component .probe (it feeds the component) but request it with the non-devm API and free it in da7218_remove(). Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20260923061305.4041197-3-chancel.liu@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>