Re: [PATCH 10/18] ASoC: Add card registration API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> (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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux