From: Mark Brown <broonie@kernel.org>
To: Himangi Saraogi <himangi774@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
julia.lawall@lip6.fr
Subject: Re: [PATCH] ASoC: sgtl5000: Use devm_ functions
Date: Mon, 7 Jul 2014 16:48:32 +0200 [thread overview]
Message-ID: <20140707144832.GL30458@sirena.org.uk> (raw)
In-Reply-To: <20140706070800.GA2927@himangi-Dell>
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
On Sun, Jul 06, 2014 at 12:38:00PM +0530, Himangi Saraogi wrote:
> diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
> index 249fadb..0efd6d6 100644
> --- a/sound/soc/codecs/sgtl5000.c
> +++ b/sound/soc/codecs/sgtl5000.c
> @@ -841,14 +841,15 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
> struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
> struct regulator_config config = { };
>
> - ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL);
> + ldo = devm_kzalloc(codec->dev, sizeof(struct ldo_regulator),
> + GFP_KERNEL);
You're using the managed functions within the ASoC level probe functions
which doesn't work - devm_ is only usable as part of the driver model
binding and unbinding. All this resource allocation needs to be moved
into the device level probe (which is a better thing anyway) before it
is converted to devm.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-07-07 14:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-06 7:08 [PATCH] ASoC: sgtl5000: Use devm_ functions Himangi Saraogi
2014-07-07 14:48 ` Mark Brown [this message]
2014-07-07 14:58 ` Julia Lawall
2014-07-07 15:20 ` [alsa-devel] " Fabio Estevam
2014-07-07 15:23 ` Julia Lawall
2014-07-07 15:34 ` Lars-Peter Clausen
2014-07-08 8:02 ` Mark Brown
2014-07-08 8:15 ` Julia Lawall
2014-07-08 14:52 ` Mark Brown
2014-07-09 5:30 ` Julia Lawall
2014-07-09 8:01 ` Mark Brown
2014-07-09 8:10 ` Julia Lawall
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=20140707144832.GL30458@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=himangi774@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/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