From patchwork Sun Aug 20 05:25:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donglin Peng X-Patchwork-Id: 9910941 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 74C95602A0 for ; Sun, 20 Aug 2017 05:36:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 555042873F for ; Sun, 20 Aug 2017 05:36:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A24428781; Sun, 20 Aug 2017 05:36:28 +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 8BE162873F for ; Sun, 20 Aug 2017 05:36:27 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C07EB26739C; Sun, 20 Aug 2017 07:26:05 +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 4FD0326739C; Sun, 20 Aug 2017 07:26:04 +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 C7E3B2673B5 for ; Sun, 20 Aug 2017 07:25:52 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id y129so19527244pgy.3 for ; Sat, 19 Aug 2017 22:25:52 -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=wHCxkeeBpn+NqrKXG08xb4BaQCqmKiasFCLp3ksWdYk=; b=emr5jVyDSS+EFa7ePd3Si9Z2pWvjRB6NO+3AJPeAxR7KuY8yOscK/dvRLcrUF71sxk sI9XcaoyuT1W/U7wVi8x5gnfQ4PnOUlsXkdo4WmfkL+YZRevIASzmz7D3l7xDmtJLiKK 0a8xF0oVWJG9sqZMFxvMTNHbsxTHDqlCV/5KYGCtp7G+DZJuxACtyJtjLxSwuS02Gf6U 58zORJXnGQ423UaQ7rWdtxq8W5aKVo2F9138uJbAFUPmzmf/pYKYs/bK70NQ8bAGWuhK KEyzPryY1fjvVuE6hEBy7z4r2CDUi1MfyXD86hgn3wOC5Cxh4lmHOUpbgQTZDxReGvId qWRw== 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=wHCxkeeBpn+NqrKXG08xb4BaQCqmKiasFCLp3ksWdYk=; b=dxLdsnemtGfB4mzvJu0vK73kYS7o1Nn+TJbk478Mtx9qGQC5KQDnFnBwMIN4etSbfn Q/IdWBtwbdrQ7Q6OzBZxzq+CcN12G1hnBqWkNI8YM4O8NNWuddzwg/BwIQLP0bkVGiA3 ywUVFMG6ZK06JEcWTnUi0vJL6KDSuIBGTXmr2Gm2atj02Kc2Hw/pIm3ykjLjkEzM5z2y iDSrEFi3so5MEdfTPc4/Q1wFMMtWFiQ99qWgp38su42VmrgOTnQN4IpQw+6NqruPJb+b QeVzHFaKi9XK8MBTA2BmaOIKxayyVUwY48RDGrdn4cdLWkAZePr8X5evnQAKYkNo3PHv kxeQ== X-Gm-Message-State: AHYfb5j6qnP6tNG+tJBrBcoJkyyk4dRbWe1sNcGBjuKoh0Iz5LAWFGNA 3zTwcaB/a4B04Q== X-Received: by 10.99.113.25 with SMTP id m25mr3005682pgc.432.1503206751578; Sat, 19 Aug 2017 22:25:51 -0700 (PDT) Received: from localhost ([123.112.80.243]) by smtp.gmail.com with ESMTPSA id 66sm16323188pfb.149.2017.08.19.22.25.50 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 19 Aug 2017 22:25:51 -0700 (PDT) From: Peng Donglin To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, heiko@sntech.de Date: Sun, 20 Aug 2017 13:25:46 +0800 Message-Id: <1503206746-15555-1-git-send-email-dolinux.peng@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Donglin Subject: [alsa-devel] [PATCH 06/12] ASoC: rockchip: 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,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin --- sound/soc/rockchip/rk3288_hdmi_analog.c | 2 -- sound/soc/rockchip/rk3399_gru_sound.c | 1 - 2 files changed, 3 deletions(-) diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index dbc53e4..37ef162 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -272,8 +272,6 @@ static int snd_rk_mc_probe(struct platform_device *pdev) return ret; } - platform_set_drvdata(pdev, card); - return ret; } diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index 3475c61..70c0908 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c @@ -362,7 +362,6 @@ static int rockchip_sound_probe(struct platform_device *pdev) rockchip_dailinks[DAILINK_RT5514_DSP].platform_name = kstrdup_const(dev_name(dev), GFP_KERNEL); card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret)