13 Mar
2013
13 Mar
'13
11:39 a.m.
On Tue, Mar 12, 2013 at 08:51:29PM -0300, Fabio Estevam wrote:
- data->codec_clk = clk_get(&codec_dev->dev, NULL);
- data->codec_clk = devm_clk_get(&codec_dev->dev, NULL); if (IS_ERR(data->codec_clk)) {
This doesn't look right, we're using the CODEC device here but this is the card driver. That means that if we unload and reload the card the clock will get acquired twice. Should be mostly harmless but still it's not good practice and would eventually run us out of memory.
Really the CODEC should be doing this but then we get into the fact that the clock API isn't reliably available and so on...