[alsa-devel] [PATCH 10/18] ASoC: Add card registration API
Takashi Iwai
tiwai at suse.de
Tue Dec 9 15:24:28 CET 2008
At Tue, 09 Dec 2008 15:17:16 +0100,
I wrote:
>
> At Tue, 9 Dec 2008 14:01:34 +0000,
> Mark Brown wrote:
> >
> > ASoC v2 allows cards, codecs and platforms to instantiate separately,
> > with the overall ASoC device only being instantiated once all the
> > required components have registered. As part of backporting Liam's work
> > introduce an initial version of the card registration functions. At
> > present these do nothing active and are internal only, they will be
> > exposed to machine drivers after further backporting. Adding this now
> > allows the datastructures used for dynamic card instantiation to be
> > built up gradually.
> >
> > Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> (snip)
> > diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> > index 2f2a8d9..44fbd71 100644
> > --- a/sound/soc/soc-core.c
> > +++ b/sound/soc/soc-core.c
> (snip)
> > @@ -784,6 +790,14 @@ static int soc_probe(struct platform_device *pdev)
> > /* Bodge while we push things out of socdev */
> > card->socdev = socdev;
> >
> > + /* Bodge while we unpick instantiation */
> > + card->dev = &pdev->dev;
> > + ret = snd_soc_register_card(card);
> > + if (ret != 0) {
> > + dev_err(&pdev->dev, "Failed to register card\n");
> > + return ret;
> > + }
> > +
>
> I guess unregister call is missing in the error path of soc_probe()?
Looking further, the patch 16/18 changes the code again, thus
the error check there will be irrelevant. Then no need to fix here...
Takashi
More information about the Alsa-devel
mailing list