alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>, alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] ASoC: fsl: imx-sgtl5000: Use devm_clk_get()
Date: Wed, 13 Mar 2013 10:39:08 +0000	[thread overview]
Message-ID: <20130313103908.GF25610@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1363132289-15211-2-git-send-email-festevam@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 615 bytes --]

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...

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2013-03-13 10:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 23:51 [PATCH 2/2] ASoC: fsl: imx-audmux: Use devm_clk_get() Fabio Estevam
2013-03-12 23:51 ` [PATCH 1/2] ASoC: fsl: imx-sgtl5000: " Fabio Estevam
2013-03-13 10:39   ` Mark Brown [this message]
2013-03-13 10:39 ` [PATCH 2/2] ASoC: fsl: imx-audmux: " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130313103908.GF25610@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).