From patchwork Tue Jul 8 16:47: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: 4506781 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 CE98DBEEAA for ; Tue, 8 Jul 2014 16:48:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E6E92018B for ; Tue, 8 Jul 2014 16:48:08 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C422320170 for ; Tue, 8 Jul 2014 16:48:06 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 47199261A27; Tue, 8 Jul 2014 18:48:05 +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, 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 4BC8D2619FB; Tue, 8 Jul 2014 18:47:54 +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 80EC72619FF; Tue, 8 Jul 2014 18:47:53 +0200 (CEST) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by alsa0.perex.cz (Postfix) with ESMTP id 3ED952619E9 for ; Tue, 8 Jul 2014 18:47:45 +0200 (CEST) Received: by mail-pd0-f172.google.com with SMTP id w10so7482442pde.17 for ; Tue, 08 Jul 2014 09:47:41 -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:in-reply-to:references; bh=/FoJ5S7ZO3GOZ48Nsv2tblCalz5uKWckWHeRRQtk/mw=; b=pv/4sRmdfvm5ek/2KTFO/YFzBi8Hq/BFzQU4+zHFuxFgJ0ztb0WjlqaWUdGcxStavi ne7R60uvL0mjqmd0L7eWnwQ/PRGp3o7x8zJnR/c6erDck8Nfn0HttvJJxzIZ0HikFqs/ GlZc5jaI04CLHWOxNed34n6JAPbF5nPYSvHWHT9qX37VQf7D26UMJAKXV94XEOS1KIOI 1PHAqxgASKATvFwtRfgpdpAlwwgSXtdshpf5Ti8Jj+gg2Spx0b0hQC3sZBwss4WEHN47 EQgzrEYcqzwRhSKLS2GSd3I/MO8XS25ivNBPGbu2uhoMnGLSK1O5u0R1a9yHfF5YNug8 IdBg== X-Received: by 10.68.139.137 with SMTP id qy9mr36191446pbb.11.1404838060411; Tue, 08 Jul 2014 09:47:40 -0700 (PDT) Received: from localhost.localdomain ([180.215.8.62]) by mx.google.com with ESMTPSA id pq3sm56285125pbb.57.2014.07.08.09.47.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Jul 2014 09:47:39 -0700 (PDT) From: Manish Badarkhe To: linux-omap@vger.kernel.org, alsa-devel@alsa-project.org Date: Tue, 8 Jul 2014 22:17:23 +0530 Message-Id: <1404838043-5095-1-git-send-email-badarkhe.manish@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: Cc: peter.ujfalusi@ti.com, badarkhe.manish@gmail.com, broonie@kernel.org Subject: [alsa-devel] [PATCH V2] ASoC: omap-hdmi: 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 --- Changes since V1: Aligned function parameter properly. :100644 100644 eb9c392... 8dcd7f7... M sound/soc/omap/omap-hdmi.c sound/soc/omap/omap-hdmi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c index eb9c392..8dcd7f7 100644 --- a/sound/soc/omap/omap-hdmi.c +++ b/sound/soc/omap/omap-hdmi.c @@ -322,8 +322,9 @@ static int omap_hdmi_probe(struct platform_device *pdev) } dev_set_drvdata(&pdev->dev, hdmi_data); - ret = snd_soc_register_component(&pdev->dev, &omap_hdmi_component, - &omap_hdmi_dai, 1); + ret = devm_snd_soc_register_component(&pdev->dev, + &omap_hdmi_component, + &omap_hdmi_dai, 1); if (ret) return ret; @@ -335,8 +336,6 @@ static int omap_hdmi_remove(struct platform_device *pdev) { struct hdmi_priv *hdmi_data = dev_get_drvdata(&pdev->dev); - snd_soc_unregister_component(&pdev->dev); - if (hdmi_data == NULL) { dev_err(&pdev->dev, "cannot obtain HDMi data\n"); return -ENODEV;