From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Keepax Subject: Re: [PATCH RESEND v7 2/3] ASoC: add es8328 codec driver Date: Wed, 9 Jul 2014 10:45:27 +0100 Message-ID: <20140709094527.GA21251@opensource.wolfsonmicro.com> References: <1404353989-19580-1-git-send-email-xobs@kosagi.com> <1404353989-19580-3-git-send-email-xobs@kosagi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1404353989-19580-3-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sean Cross Cc: Mark Rutland , lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Grant Likely , Rob Herring , Shawn Guo , Philipp Zabel , Fabio Estevam , Nicolin Chen , alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, bunnie-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org List-Id: devicetree@vger.kernel.org On Thu, Jul 03, 2014 at 10:19:48AM +0800, Sean Cross wrote: > Add a codec driver for the Everest ES8328. It supports two separate audio > outputs and two separate audio inputs. > > Signed-off-by: Sean Cross > --- > + > +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. Otherwise this looks pretty good to me. Thanks, Charles -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html