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: 9910917 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 EC79260382 for ; Sun, 20 Aug 2017 05:26:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDFCE286F5 for ; Sun, 20 Aug 2017 05:26:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D281F28781; Sun, 20 Aug 2017 05:26:32 +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=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6FF46286F5 for ; Sun, 20 Aug 2017 05:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=NOpsBdja4UnQtfPy2IZDYVf2BWYTp+y8LHSelR1pQ2k=; b=jvW jA/eGSx65xEGZ+Nzr0CxLs6LyCq1eUlgAHiyyUwjV3TsJ/7BQ72cFYwA7ITKtLKDZ4KBrWOcdBHNJ JBWmH3UxKgnCC321VWi/jue3omlfNIuLGgGosOXofTL9H5zTZn5SaIhUCxztZ0rQYIkIK8ffpCsQz ArVwKJMj7uVhE4xPqTCWZU/jXU1mDCJ+N55DOe6HPDi04bMUqlwrsXEW1GaaKlF2Q6eCo0lwEQ3AN YZCKIbFhbvlfg6vA5I8VuxgwkT31zVdtN5gVfV/FOQGb/Qodebf2/Eb+L0dz6j687GDpy2KHIFds9 MFM1VJiX7PuokzoVKMjRnTfG36rdwfw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1djIkp-0004ny-E1; Sun, 20 Aug 2017 05:26:31 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1djIkW-0004N6-W5; Sun, 20 Aug 2017 05:26:14 +0000 Received: by mail-pg0-x242.google.com with SMTP id i12so4223233pgr.1; 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=rveoYwxwQMkowmHzSpdo4avuqo+DY+yC577th6K1+XypvvYdeJ1Z9TKZOPCiC3Al9K k2AS6fO8SLD19fHJhGbdhRFXRTfAG1j2+lgggx6YC2VlTBECo3777543yz+rihlDXhgt BP7oU47NMRfKS6Mwsnv9Iav+q1fL92y/fQJrrIeBJ1JUoqnBg9gLdaaONKFrX4WTSWS7 CGmQB1OoY8ASFJWIvD7aTUSho9jnLOROBFhesqV9Zz2F4Qs+uZ16is9gC7FfBRkoDHT9 5t/3QOJJE7+0HwtzscEWdhCIYsvXAP8j8kaKT9EIdbNwJSj+lQIoAO8ST10U++kr37RQ QP0g== X-Gm-Message-State: AHYfb5hDVAbXG6zN3aAUJ7n2VViE2MlGhY3EGHEiYLCtkGH4Ojcw1n2W 6ZQeGCqGmX7HCA== 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 Subject: [PATCH 06/12] ASoC: rockchip: Remove unnecessary function call 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170819_222613_063768_5D468990 X-CRM114-Status: UNSURE ( 7.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Donglin MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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)