[alsa-devel] [PATCH] ASoC: imx-sgtl5000: Use devm_clk_get()

Fabio Estevam festevam at gmail.com
Tue Jun 11 04:04:29 CEST 2013

On Mon, Jun 10, 2013 at 9:44 PM, Shawn Guo <shawn.guo at linaro.org> wrote:

> I do not think the change is correct.  It only works if the struct *dev
> is what imx_sgtl5000 platform_device points to, that is pdev->dev here.
> However what you pass here is codec's.  So when imx_sgtl5000_probe()
> fails or imx_sgtl5000 module is removed, clk_put() will not be called.
> And if I remember correctly, that's the reason why devm_clk_get() wasn't
> used here in the first place.

Ok, as you suggested I think we should handle the clocks at the codec
driver only and pass the codec frequency to the machine driver.

Will work on it tomorrow.

More information about the Alsa-devel mailing list