From patchwork Sun Aug 20 05:22:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donglin Peng X-Patchwork-Id: 9910909 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 A693360382 for ; Sun, 20 Aug 2017 05:23:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9832C28770 for ; Sun, 20 Aug 2017 05:23:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CD3A2877A; Sun, 20 Aug 2017 05:23:29 +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=unavailable 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 574C828779 for ; Sun, 20 Aug 2017 05:23:28 +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=Qbt3AnuSDp5GF3zippj3pKGEK5nFEGRPbuUfdfQUMHU=; b=Z8z VHfsAWl6fMvpW6shtgCbYVaVjKTYGazzrwjpe+lb8rnN7OUljnaVVjGbn3Ufd2ysKKLEHdQixXhGs pAw1fNUA+A3ietu9oDakedU1DpY6ouY/HN2/kF8/DtFLdiR+TD5goERugGqCXr91P8t0TAgMxzlDh oKl2yKiItEUEMupgwaAQF8PNQGLntc4kwljppzZPt90btcV0VK5rmSpfZzhvnP3l4EaankkwRqKMg UFmP8iWIR5rrRu3a5OK+o1GqyyQqDOFA3g12dtPF7zAjkAriaM8Sy7ArOjbhBjzEWXLGGXKnCjaaY bOJK13h52cCq0stZuFJe+Elkais4Wug==; 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 1djIgy-0001vb-GL; Sun, 20 Aug 2017 05:22:32 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1djIgr-0001sN-M0; Sun, 20 Aug 2017 05:22:30 +0000 Received: by mail-pg0-x243.google.com with SMTP id 83so19539284pgb.4; Sat, 19 Aug 2017 22:22:05 -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=tVFTF6Lr60knTngVhK72bqCvupK8fv4JLRkVL56LK94=; b=pUtwv1kIrNcwuj8mc2enX6h+jNCCPnYG+dkJaigOGBNS0+ulyvqA8vlW0fn0uOa9Hj +8DIazNK6OER5Mpw+vlEaLjaJaplYV5/fmZMuSMYnB3ZQfkrkFCvASKeCje/2pUWEV6X BkJXv33Ji1sobfL5aPXhw4gsHJurbrFbDCfHMaZ01GxpsHcMG+mij2oOENVj0Zknfyoi 1b2ySgN3+fKp4xbUSYU1HYJnnYQbn/KrYhYJSTx6Id7bkjQ1pYfsUI489SkUlRB6cOPw 8LQfvMy9FvGhig2mNEBaB9yAzzoSCzgGRpMudWO8zdJGQi8bG0ooFWskn4GQfWX3NhAh 8ZoA== 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=tVFTF6Lr60knTngVhK72bqCvupK8fv4JLRkVL56LK94=; b=o6RnqodFU5ohPHFHksUWtNj4jiOLSuyAwujYzVxN/xHoFDi5hs1gsuYhXP+31Z4OVu E78ltxs59I5a3Q+RDcS3hq6GnvjLKgr6CwRSEO0feNzmvuDiZxn1qXcromC3VJlbETBT MpCWpO0L3P3LYHNjb5tdZaIofy4cECebxiaKpJpS2x/rYjQNmUp6GUbrrjrUAOvE08wC xlEVfu2dlqfE0Cs9prpvVKuHZq9AIEyZlorMdr+Ba7BHxQfZGKuHvnA2hbeiXDkSW+fV iGoKcNaen7au//3pDnHeVcE7E+iX+N+V6jYRehc8dwqVogdsV47E3NB7LwHbebLpKiSQ tbbA== X-Gm-Message-State: AHYfb5iIfc8wkZ+3rWKTEEEAA6QHJTFrsJM1Tpz6A195VAAwasmiV+xv ilTTcFdkgSVnyQ== X-Received: by 10.99.97.207 with SMTP id v198mr9700393pgb.346.1503206525294; Sat, 19 Aug 2017 22:22:05 -0700 (PDT) Received: from localhost ([114.244.64.8]) by smtp.gmail.com with ESMTPSA id e198sm16836862pfh.36.2017.08.19.22.22.03 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 19 Aug 2017 22:22:04 -0700 (PDT) From: Peng Donglin To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com Subject: [PATCH 02/12] ASoC: mediatek: Remove unnecessary function call Date: Sun, 20 Aug 2017 13:22:00 +0800 Message-Id: <1503206520-15031-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_222225_866207_AF70B541 X-CRM114-Status: UNSURE ( 7.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Donglin MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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/mediatek/mt8173/mt8173-rt5650-rt5514.c | 1 - sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 1 - sound/soc/mediatek/mt8173/mt8173-rt5650.c | 1 - 3 files changed, 3 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c index 5e383eb..99c1521 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c @@ -222,7 +222,6 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev) mt8173_rt5650_rt5514_codecs[1].of_node; card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c index fed1f15..42de84c 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c @@ -279,7 +279,6 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev) } card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c index a784708..e69c141 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -311,7 +311,6 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev) return -EINVAL; } card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret)