From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 10/18] ASoC: Add card registration API Date: Tue, 09 Dec 2008 15:17:16 +0100 Message-ID: References: <20081209140101.GA17558@rakim.wolfsonmicro.main> <1228831302-17605-1-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-2-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-3-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-4-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-5-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-6-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-7-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-8-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-9-git-send-email-broonie@opensource.wolfsonmicro.com> <1228831302-17605-10-git-send-email-broonie@opensource.wolfsonmicro.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 14C8E2446C for ; Tue, 9 Dec 2008 15:17:17 +0100 (CET) In-Reply-To: <1228831302-17605-10-git-send-email-broonie@opensource.wolfsonmicro.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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 (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()? Takashi