Thread (1 message) 1 message, 1 author, 2014-07-10

Re: [PATCH RESEND v7 2/3] ASoC: add es8328 codec driver

From: Mark Brown <hidden>
Date: 2014-07-10 12:55:18
Also in: alsa-devel

On Wed, Jul 09, 2014 at 10:45:27AM +0100, Charles Keepax wrote:
On Thu, Jul 03, 2014 at 10:19:48AM +0800, Sean Cross wrote:
quoted
+static int es8328_codec_probe(struct snd_soc_codec *codec)
+{
+	struct es8328_priv *es8328;
+	int ret;
+	int i;
+
+	es8328 = snd_soc_codec_get_drvdata(codec);
+
+	for (i = 0; i < ARRAY_SIZE(es8328->supplies); i++)
+		es8328->supplies[i].supply = supply_names[i];
+
+	ret = devm_regulator_bulk_get(codec->dev, ARRAY_SIZE(es8328->supplies),
+				es8328->supplies);
Is it safe to use devm_ from the ASoC level probe here? I think
there was a discussion recently that this can cause problems on
driver unbinding.
No, it's not and there's a much bigger problem here that we shouldn't be
doing resource allocation in the ASoC level probe().

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help