[alsa-devel] [PATCH RESEND v7 2/3] ASoC: add es8328 codec driver
Mark Brown
broonie at kernel.org
Thu Jul 10 14:55:18 CEST 2014
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:
> > +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().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140710/891ebaad/attachment.sig>
More information about the Alsa-devel
mailing list