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