From patchwork Sun Aug 20 05:22:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donglin Peng X-Patchwork-Id: 9910935 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 AA701602B1 for ; Sun, 20 Aug 2017 05:31:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BA0D28779 for ; Sun, 20 Aug 2017 05:31:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8405428781; Sun, 20 Aug 2017 05:31:26 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, 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 D0B0D2878C for ; Sun, 20 Aug 2017 05:31:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CEBFA26737C; Sun, 20 Aug 2017 07:22:51 +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 075E126738C; Sun, 20 Aug 2017 07:22:50 +0200 (CEST) Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by alsa0.perex.cz (Postfix) with ESMTP id ECC8326737C for ; Sun, 20 Aug 2017 07:22:33 +0200 (CEST) Received: by mail-pf0-f194.google.com with SMTP id z3so1931263pfk.0 for ; Sat, 19 Aug 2017 22:22:33 -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; bh=qe7vgxGAvxx81eBY5oIkfv3w5LXEXufAhkyTGG00S/I=; b=Ach4avZKQuyAlPQgIG3USPUaYU9pmdyIndNPsp43Z/Nd0wFJjbCEmKH5ZyFTVxF9pO Pg7+OlsGuR+muvuRP11V/dqnGRfrx7GSRoGOeu1M8QM6EvkCxgOhiSVsHgRL9a9pCDVS ocppwRgMpdi/gzSHWGb0GLV1Nmx+shDpu9brttzQ73N4odOiMZvlfhUI6G0aQFAvnybH LzdfcJaqPyfn43oZDXfq4oqeLPggAoLzVm8+THlqY1ewatL7g7F90Iwz4/K93sbOjMEj 1Xhk/oeYE5AcJ07tSazBVD/r80ki3LoWv8gQxN8pl/kW8yQaREDG7+3dCucM83wJmJM1 Xu8g== 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; bh=qe7vgxGAvxx81eBY5oIkfv3w5LXEXufAhkyTGG00S/I=; b=UxrfPceBA20VdsRri0xSIHm6JrndZEtV2tjt/WWpwbx/UrHuDTBxFQMVnduzCHw09B 1rBf8zcsDDjn2jJzsw94hhwUPrSPT831i53jmdGMtiFjeDM+qJaSxE5T9e6rycZHfEqA Jh/3ymqJRRGVq9J1PukpGqZ53OoZvqK2Gfy8uJV16fJNtyke/lACIyfmbHetQYef4X/M uBMhQMMdq2nyHoghunWKge9BUv+NPw3oINpxT5cT2Fak14gywwQEh35QIguzMIeHbdsy Jr2xms1/qaQsVJkUQzjpAIbmYzu/ND+67BHvW5y1I7B9Ng1K2ZUxyzO6/qJt0gFotJmq QDVQ== X-Gm-Message-State: AHYfb5jVvTC9ZrJDSAZDtu5o4ABz7lBEYYfs3/rOydUwDAdPpDPQU+fz 0SNJC+2HtcTFWA== X-Received: by 10.98.3.3 with SMTP id 3mr13396252pfd.31.1503206552854; Sat, 19 Aug 2017 22:22:32 -0700 (PDT) Received: from localhost ([221.216.53.110]) by smtp.gmail.com with ESMTPSA id y8sm18553624pfi.159.2017.08.19.22.22.31 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 19 Aug 2017 22:22:32 -0700 (PDT) From: Peng Donglin To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com Date: Sun, 20 Aug 2017 13:22:27 +0800 Message-Id: <1503206547-15121-1-git-send-email-dolinux.peng@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Peng Donglin Subject: [alsa-devel] [PATCH 03/12] 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 First of all,the address of pdev->dev is assigned to card->dev, when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) copies the value the variable card to card->dev->driver_data.After that,the function platform_set_drvdata does the same copy operation, so i think that the latter copy operation can be removed. Signed-off-by: Peng Donglin --- sound/soc/intel/boards/bytcht_da7213.c | 1 - sound/soc/intel/boards/bytcht_es8316.c | 1 - sound/soc/intel/boards/bytcr_rt5651.c | 1 - sound/soc/intel/boards/cht_bsw_max98090_ti.c | 1 - sound/soc/intel/boards/cht_bsw_rt5645.c | 1 - sound/soc/intel/boards/cht_bsw_rt5672.c | 1 - 6 files changed, 6 deletions(-) diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c index 18873e2..fbc870b 100644 --- a/sound/soc/intel/boards/bytcht_da7213.c +++ b/sound/soc/intel/boards/bytcht_da7213.c @@ -265,7 +265,6 @@ static int bytcht_da7213_probe(struct platform_device *pdev) "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 5263546..5e6e8e9 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -282,7 +282,6 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) 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/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 4a3516b..77702aa 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -310,7 +310,6 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) 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 20755ec..8583c0c 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -300,7 +300,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev) "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 5bcde01..0e6a24c 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -699,7 +699,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev) "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 bc2a52d..e8bd22b 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -448,7 +448,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev) "snd_soc_register_card failed %d\n", ret_val); return ret_val; } - platform_set_drvdata(pdev, &snd_soc_card_cht); return ret_val; }