From patchwork Tue Jul 8 16:25:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Badarkhe X-Patchwork-Id: 4506691 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8722DBEEAA for ; Tue, 8 Jul 2014 16:26:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA990201E4 for ; Tue, 8 Jul 2014 16:26:46 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 75D9D200E1 for ; Tue, 8 Jul 2014 16:26:42 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 24EC7261A1A; Tue, 8 Jul 2014 18:26:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 002182619FB; Tue, 8 Jul 2014 18:26:30 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7F1372619FF; Tue, 8 Jul 2014 18:26:29 +0200 (CEST) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by alsa0.perex.cz (Postfix) with ESMTP id 3BC132619E9 for ; Tue, 8 Jul 2014 18:26:21 +0200 (CEST) Received: by mail-pa0-f52.google.com with SMTP id eu11so7585609pac.39 for ; Tue, 08 Jul 2014 09:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=YkxV0KNok95EmriLVGoQG5Nw5KKiKHpaX5AUvwPUKMM=; b=DUWaG8ijiSSHV/mwStz+D4x2OFivOdjIb64pNyVy7qvaE6SBQvqyN4NQJmflB8GHL+ N/6j+ekWL/Ya2QkAjbihpTYP25UZa/PH37TDmdxP/9B2itDMD47Z2NamsNGotCGN83LU 8iMZDBXzi/08v9n9oWHcjwDy2PaQSdV9HrpFt4EQWiRjJdhZgMayU+3gapPOznja9Dvm +LYlT44nZ8+HjNWrAAomzrK8IScSj19OwTV3YzfYPdMK7LtZ+6ymwLqjuhuUo3FipbUJ /6lzFCSpVa0UapzcIE0Nz3WmZzm5MpNRlXxzAjCiLSdcSuwwdljO3qMi+579SMeCOau5 2MqA== X-Received: by 10.70.38.136 with SMTP id g8mr4096029pdk.135.1404836780149; Tue, 08 Jul 2014 09:26:20 -0700 (PDT) Received: from localhost.localdomain ([180.215.8.62]) by mx.google.com with ESMTPSA id o4sm24969434pdd.22.2014.07.08.09.25.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Jul 2014 09:26:19 -0700 (PDT) From: Manish Badarkhe To: linux-omap@vger.kernel.org, alsa-devel@alsa-project.org Date: Tue, 8 Jul 2014 21:55:23 +0530 Message-Id: <1404836723-4779-1-git-send-email-badarkhe.manish@gmail.com> X-Mailer: git-send-email 1.7.10.4 Cc: peter.ujfalusi@ti.com, badarkhe.manish@gmail.com, broonie@kernel.org Subject: [alsa-devel] [PATCH V2] ASoC: omap-mcbsp: Use devm_snd_soc_register_component X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Replaced snd_soc_register_component with its devres equivalent, devm_snd_soc_register_component. Signed-off-by: Manish Badarkhe Acked-by: Peter Ujfalusi --- Changes since V1: Aligned function parameter properly. :100644 100644 efe2cd6... bd3ef2a... M sound/soc/omap/omap-mcbsp.c sound/soc/omap/omap-mcbsp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index efe2cd6..bd3ef2a 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -805,8 +805,9 @@ static int asoc_mcbsp_probe(struct platform_device *pdev) if (ret) return ret; - ret = snd_soc_register_component(&pdev->dev, &omap_mcbsp_component, - &omap_mcbsp_dai, 1); + ret = devm_snd_soc_register_component(&pdev->dev, + &omap_mcbsp_component, + &omap_mcbsp_dai, 1); if (ret) return ret; @@ -817,8 +818,6 @@ static int asoc_mcbsp_remove(struct platform_device *pdev) { struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev); - snd_soc_unregister_component(&pdev->dev); - if (mcbsp->pdata->ops && mcbsp->pdata->ops->free) mcbsp->pdata->ops->free(mcbsp->id);