From patchwork Wed Aug 23 12:19:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donglin Peng X-Patchwork-Id: 9917263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ACB6960327 for ; Wed, 23 Aug 2017 12:19:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E51E205AB for ; Wed, 23 Aug 2017 12:19:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9328B27853; Wed, 23 Aug 2017 12:19:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 957DB205F6 for ; Wed, 23 Aug 2017 12:19:26 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 99D772673A1; Wed, 23 Aug 2017 14:19:20 +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 BDBBE267445; Wed, 23 Aug 2017 14:19:18 +0200 (CEST) Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by alsa0.perex.cz (Postfix) with ESMTP id CCDD5267364 for ; Wed, 23 Aug 2017 14:19:15 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id r133so1363726pgr.1 for ; Wed, 23 Aug 2017 05:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EyzdnOLcFa3Dg/NViWTssGOTcUWrUX78uSIQ++71ae0=; b=fS49kagzbc+8z1lKRyz8uDlCNwL9SdwgmHZ6FjvSZPKGlvd/hmii7Sw0+gdivt4a+0 X0ErNymWYZ3ahhnwgaGyYqNxSbzuIRNzgS3Wh3JAlVR9+zomvoyP3V/HhChBUqDNIxNJ LTHVqWaK+a8PRbpf/gWLhn+TJsn9HID9GNP9caDqdpYUnWgdr/RMGPBwZY/QwMc9PnD3 xUzzc1movltuZ/LPxutiDUYmhLX7swgmiDAoHIDkQYOOnxno3zm3Mbo2bKezvxBTlKUZ L0CTcJXH1/LOyA9p7LUXP7eCkvSr2wCtGDvy6BTbNm/1qdv16+Wyn9dintLSbhcDu0Sx I7Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EyzdnOLcFa3Dg/NViWTssGOTcUWrUX78uSIQ++71ae0=; b=JMH8ETSrCGmVEiIuva+brKN8fdOdisZWJp8dMdbTHQ3Cv+XunWgztSFj5KSva+dzFN jvN8SasOh9rUR9D96p76cFfXug7GidQKbjlabdIkhldgM90j0CRTguGNu1N+mYpLoU9M AXk3Y3x0pTwOBasO+hXocPeUxYVxMo/vnaWQrt8pdA8ojZsPDLDrbksIOwx/WH0EnbOU Ta2FLVJI5xzH8oa2hNIsEWYu+gmCeSIYaxXwAfnIFOdYS57DHxxywc4H48SmEQgmhSeG pa7cAlFd1jLb2KDHIrhzGElj290838sL6JqVJnT59YwFzOEGiqRq8lHi1RTJ/4doVFSe tFnQ== X-Gm-Message-State: AHYfb5g3Xz5U1VyeZ4ESJVMOxia5V+/DjLsX9qXtTlE+103SeRR39497 iueoCj2NkSbBYg== X-Received: by 10.84.229.136 with SMTP id c8mr2888094plk.27.1503490754786; Wed, 23 Aug 2017 05:19:14 -0700 (PDT) Received: from localhost ([45.41.135.42]) by smtp.gmail.com with ESMTPSA id q3sm3429378pgf.69.2017.08.23.05.19.12 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 23 Aug 2017 05:19:14 -0700 (PDT) From: Peng Donglin To: pierre-louis.bossart@linux.intel.com Date: Wed, 23 Aug 2017 05:19:07 -0700 Message-Id: <63f080c9ef444ef32486914be97ed5f8c8c55d9f.1503484313.git.dolinux.peng@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, Peng Donglin , tiwai@suse.com, broonie@kernel.org Subject: [alsa-devel] [PATCH v2 03/10] ASoC: Intel: Remove unnecessary function call 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 The work of the function platform_set_drvdata is done by devm_snd_soc_register_card. Signed-off-by: Peng Donglin --- Changes in v2: -add missed occurrences. sound/soc/intel/boards/bytcht_da7213.c | 6 ++---- sound/soc/intel/boards/bytcht_es8316.c | 6 ++---- sound/soc/intel/boards/bytcht_nocodec.c | 6 ++---- sound/soc/intel/boards/bytcr_rt5640.c | 7 ++----- sound/soc/intel/boards/bytcr_rt5651.c | 7 ++----- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 ++---- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 ++---- sound/soc/intel/boards/cht_bsw_rt5672.c | 6 ++---- 8 files changed, 16 insertions(+), 34 deletions(-) diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c index 18873e23f404..f43ced5288af 100644 --- a/sound/soc/intel/boards/bytcht_da7213.c +++ b/sound/soc/intel/boards/bytcht_da7213.c @@ -260,12 +260,10 @@ static int bytcht_da7213_probe(struct platform_device *pdev) } ret_val = devm_snd_soc_register_card(&pdev->dev, card); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, card); + return ret_val; } diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index 52635462dac6..c3213f320869 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -278,11 +278,9 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) } ret = devm_snd_soc_register_card(&pdev->dev, &byt_cht_es8316_card); - if (ret) { + if (ret) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret); - return ret; - } - platform_set_drvdata(pdev, &byt_cht_es8316_card); + return ret; } diff --git a/sound/soc/intel/boards/bytcht_nocodec.c b/sound/soc/intel/boards/bytcht_nocodec.c index 1dd9441806fa..b9adde0e2a9f 100644 --- a/sound/soc/intel/boards/bytcht_nocodec.c +++ b/sound/soc/intel/boards/bytcht_nocodec.c @@ -185,12 +185,10 @@ static int snd_bytcht_nocodec_mc_probe(struct platform_device *pdev) ret_val = devm_snd_soc_register_card(&pdev->dev, &bytcht_nocodec_card); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &bytcht_nocodec_card); + return ret_val; } diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 4a76b099a508..9a5775c89393 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -912,13 +912,10 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) } ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5640_card); - - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &byt_rt5640_card); + return ret_val; } diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 4a3516b38c2c..c50a3834d0eb 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -304,13 +304,10 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) byt_rt5651_card.dev = &pdev->dev; ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5651_card); - - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "devm_snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &byt_rt5651_card); + return ret_val; } diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c index 20755ecc7f9e..62d45e0badc5 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -295,12 +295,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev) snd_soc_card_cht.dev = &pdev->dev; snd_soc_card_set_drvdata(&snd_soc_card_cht, drv); ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &snd_soc_card_cht); + return ret_val; } diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 5bcde01d15e6..511d4d9b24bf 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -694,12 +694,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev) snd_soc_card_set_drvdata(card, drv); ret_val = devm_snd_soc_register_card(&pdev->dev, card); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, card); + return ret_val; } diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index bc2a52de06a3..656cef7da054 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -443,12 +443,10 @@ static int snd_cht_mc_probe(struct platform_device *pdev) /* register the soc card */ snd_soc_card_cht.dev = &pdev->dev; ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht); - if (ret_val) { + if (ret_val) dev_err(&pdev->dev, "snd_soc_register_card failed %d\n", ret_val); - return ret_val; - } - platform_set_drvdata(pdev, &snd_soc_card_cht); + return ret_val; }