Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753998AbbHQHgj (ORCPT ); Mon, 17 Aug 2015 03:36:39 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:58233 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753142AbbHQHgh (ORCPT ); Mon, 17 Aug 2015 03:36:37 -0400 Subject: Re: [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component To: Vaishali Thakkar , Mark Brown References: <20150815023155.GA27364@localhost> CC: Jaroslav Kysela , Liam Girdwood , Takashi Iwai , Wolfram Sang , , From: Peter Ujfalusi Message-ID: <55D18EF2.8090300@ti.com> Date: Mon, 17 Aug 2015 10:36:18 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150815023155.GA27364@localhost> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2022 Lines: 63 On 08/15/2015 05:31 AM, Vaishali Thakkar wrote: > Use resource managed function devm_snd_soc_register_component for > component registration instead of snd_soc_register_component. > > Also, remove davinci_vcif_remove as it is now redundant. Acked-by: Peter Ujfalusi > Signed-off-by: Vaishali Thakkar > --- > sound/soc/davinci/davinci-vcif.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c > index fabd05f..c77d921 100644 > --- a/sound/soc/davinci/davinci-vcif.c > +++ b/sound/soc/davinci/davinci-vcif.c > @@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev) > > dev_set_drvdata(&pdev->dev, davinci_vcif_dev); > > - ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component, > - &davinci_vcif_dai, 1); > + ret = devm_snd_soc_register_component(&pdev->dev, > + &davinci_vcif_component, > + &davinci_vcif_dai, 1); > if (ret != 0) { > dev_err(&pdev->dev, "could not register dai\n"); > return ret; > @@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev) > ret = edma_pcm_platform_register(&pdev->dev); > if (ret) { > dev_err(&pdev->dev, "register PCM failed: %d\n", ret); > - snd_soc_unregister_component(&pdev->dev); > return ret; > } > > return 0; > } > > -static int davinci_vcif_remove(struct platform_device *pdev) > -{ > - snd_soc_unregister_component(&pdev->dev); > - > - return 0; > -} > - > static struct platform_driver davinci_vcif_driver = { > .probe = davinci_vcif_probe, > - .remove = davinci_vcif_remove, > .driver = { > .name = "davinci-vcif", > }, > -- P?ter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/