From patchwork Thu Jul 14 11:11:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102016 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp21061qga; Thu, 14 Jul 2016 04:13:58 -0700 (PDT) X-Received: by 10.66.220.73 with SMTP id pu9mr21546710pac.77.1468494838132; Thu, 14 Jul 2016 04:13:58 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id m75si303117pfa.29.2016.07.14.04.13.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 04:13:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZd-0007WM-IO; Thu, 14 Jul 2016 11:12:57 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ3-00070l-Gc for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 11:12:24 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0M8mxE-1bXWyh1Keq-00C7cc; Thu, 14 Jul 2016 13:11:51 +0200 From: Arnd Bergmann To: Wan Zongshun Subject: [PATCH 2/7] ARM: nuc900: avoid ASoC header dependency Date: Thu, 14 Jul 2016 13:11:30 +0200 Message-Id: <20160714111135.2476095-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160714111135.2476095-1-arnd@arndb.de> References: <20160714111135.2476095-1-arnd@arndb.de> X-Provags-ID: V03:K0:IkHSfsBvuHyQPSaHqe5EbbT7creRWfN/NTHAEZ0MxYpfkGi+Xha L+4CaPB+tyLzaQ3xBn12SnmOTh38BzJ19B5r6cMnpiAFAeUtVEZtv3HQTa14HWDWiNNWCdb MPYcZriAOwQE5BSRiO3XWbPD8FyniG9qCn/XTZp8LhuCkVpO/+8YtNhundJX6BKzJlJFVfn iyggbD2dBuP/e9iryJfbw== X-UI-Out-Filterresults: notjunk:1; V01:K0:WMJFtM3Nk44=:NHALtUMdjAEXjCQq07AbfL jmoYgkqVODF9xA2Mr80yCMns/k2Z9ytbzdFUiqY/ERkLTu+2ZQu0E6OrtCXn5vDUgTE4YW17N 2H+2dliM806pYTQhkalJbwu5iLtWDqMxYLTBV95JwK13d20OzAUEhbwN5XNOM2ZUYE/UiJtHx WU7sgzTM1cuBo//Ru3wl3H+ie3wgyX3KWKFSzP0J2Pb7t/mUq3BZEUbAhesGDdeimzdIcJz3/ AwFRzAaG9Ey+0bypYeKjY9tebtMayaCsUxBzUBWpBDVdoS5mVnkq4HkyWz2FRls01IVEtqK1Q T1X3XHlTG/LMGCxzgTXAfM7P7J/F4sY0wnHMBbWqY8Rrmzoxtz/FyDoQLJOs8dqNHitlahaul qGm4CAKQK7aOzbEsfq6SDxZQ0J5hH2UPJTSbKElaxi7OoAEwnjTUyLY86wcR+HMSSfWtJXb6n 5jb4DCyNHMH+zOR8HBIZ5d5GuHwj4AKL64+Czb4y41N8Sh6lyLF4ZZcp1Q2cwhRPoX8XnwRwt TzXFKoVAn/sE5K9FSxIgFshMTtAKkgfnPCPcaLC++UN6Zhj2GCyxbdU/9uQLxKPam/5rptfL9 AtuzWDkgasn/cxbMBE+Stui5T1czd7qsm1mUEftpvhm14XGjVxlFFPcbPD/rZo7cJkCyndg0u ZgoxQoE40wQKiMirhEguZjQapya81n392vkhRFaNo4W+N2m2SjGqj1Nf/tJW20uOeTBY= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_041222_005645_89ED259A X-CRM114-Status: GOOD ( 12.18 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.130 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.130 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Wan Zongshun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The ac97 driver remains as one of the few places using w90x900/nuc900 mach/*.h header files for the purpose of pin configuration. We can avoid that by passing a pointer to the one function it needs to call as platform data. Signed-off-by: Arnd Bergmann --- arch/arm/mach-w90x900/dev.c | 1 + sound/soc/nuc900/nuc900-ac97.c | 6 ++++-- sound/soc/nuc900/nuc900-pcm.c | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index ea84f053bcd3..9c9292feb066 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c @@ -512,6 +512,7 @@ struct platform_device nuc900_device_ac97 = { .dev = { .dma_mask = &nuc900_device_audio_dmamask, .coherent_dma_mask = -1, + .platform_data = mfp_set_groupg, } }; diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index b6615affe571..04bb89f0b6a4 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c @@ -22,8 +22,6 @@ #include #include -#include - #include "nuc900-audio.h" static DEFINE_MUTEX(ac97_mutex); @@ -320,6 +318,8 @@ static const struct snd_soc_component_driver nuc900_ac97_component = { static int nuc900_ac97_drvprobe(struct platform_device *pdev) { + void (*mfp_set_groupg)(struct device *dev, const char *subname); + struct nuc900_audio *nuc900_audio; int ret; @@ -362,6 +362,8 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev) if (ret) goto out; + mfp_set_groupg = platform_get_drvdata(pdev); + /* enbale ac97 multifunction pin */ mfp_set_groupg(nuc900_audio->dev, NULL); diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c index 2cca055fd806..70883ec94f89 100644 --- a/sound/soc/nuc900/nuc900-pcm.c +++ b/sound/soc/nuc900/nuc900-pcm.c @@ -21,8 +21,6 @@ #include #include -#include - #include "nuc900-audio.h" static const struct snd_pcm_hardware nuc900_pcm_hardware = {