From patchwork Tue Oct 1 14:20:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174863 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8619615ill; Tue, 1 Oct 2019 07:21:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeyC+U0TYbNU9bNvGyEHQv8cDi1MsT7Yo4PwMwJejC9TSkLXq8ZLlWYh2zF+emay0rP2Qy X-Received: by 2002:a17:906:2542:: with SMTP id j2mr24779174ejb.278.1569939712937; Tue, 01 Oct 2019 07:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569939712; cv=none; d=google.com; s=arc-20160816; b=PboSh6tR/i6MmDuSiBm5A+ZCLOUQXQo2+OfRuAoT3os3o9FQBwxg/ANID12hFZz4TG sOksNlykwve9bOgFcddml9znqGurKxLrIAlRPR97RGuXrbB7RL89bjtR867ehBYozxKb /G4BE87GAnewikNlwU6rma1eFNwVddH+hYheoVgJAXU0REJ54QGEJB557gvmRWBCdugG CHUjy+Qq3LI6rQh7CoSNBUPP9oIsQl9wwZLCUuXVjyVML2FpvEqOiHFfxMtwidEttlfl CYgUiXrZIls6RVy6P5Xl/6lgGwI/xyzUcAAV4Sj9f/MKF0P8GrD+DdTO70Shk0AxxT59 Msmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=FILiDwCu37lSZXjdaRMZjCMKKUeVYTE1AZse6TEaAcg=; b=OJdqbrhMXA3HtyvKjqAZI78tZ/UPVwkFt/UBCZqQPjI3gx1Ka2ImecIAzZX4cphKtm Qmz8elQMhHmZWFHQGN26rB2y2gBzenNYyhWOY3TaGXXJQ9PokTxRhpsPMUxYPaaDJbp5 wo+QsUyKGtdtKJNVTR8OaTRga+TtjQNDaeCA2Xm+I35VKMA7CQwrtSCvNKWa+HbGDFAO TO3YmrSASItsu05FrCp2cMXp5vfivOxiFp/dUQN2XbiaAPin4ze6Nd1c+QWy8nPdD2hG VbFwkdIs+vPBcgbncYJDdK4gMFKJvGEiHo6RiJ9XlHY+PEkMaLoSAMhqw/AbR9Cep7FK NZUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si8954184ejj.47.2019.10.01.07.21.52; Tue, 01 Oct 2019 07:21:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388934AbfJAOVw (ORCPT + 27 others); Tue, 1 Oct 2019 10:21:52 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:56411 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727096AbfJAOVv (ORCPT ); Tue, 1 Oct 2019 10:21:51 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MHoVE-1iKFDt0sgo-00ExaL; Tue, 01 Oct 2019 16:20:31 +0200 From: Arnd Bergmann To: Mark Brown Cc: Arnd Bergmann , Hulk Robot , YueHaibing , Daniel Baluta , Pierre-Louis Bossart , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: SOF: imx: fix reverse CONFIG_SND_SOC_SOF_OF dependency Date: Tue, 1 Oct 2019 16:20:09 +0200 Message-Id: <20191001142026.1124917-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:hL/OrOqx1oO4Bmp86kRM00tNRZ3chWT/eTPxi4JaUrsImLSXYp7 i+qhAnFRG6eViMZ5TNl46bk0rixPpe+lc1OET7BF5YF7A071moylb49GvEj4GDKarj0uC0+ ZU+hnVbZdw2WlCiPsgBt8jo3E/gi5h3MNgOBHDOJ3oB6ufIx8rjPWbFJglcQSltdef+vZ+z vb+eFvoyJkEdMHXsRPfSg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:UD9CBuUg62g=:c9PbZz2InB7poesIjc/J/C JDvhs0OAUieNXQYRdSS/AETOv3aLuELWRzX420aQAkLscCBi3TzXaYL5Je/C5Hm+pDziHPC+f c8/qVlqXWZtXwbsyGdhRNrkj5uwl96NnLUAmarjmwh68CXMZ4J5Wlk7oaKCVyRQTR1xHpL8LY qQmtbXueO1sAQqJOPbZ0gmzdpEn38ToU3i5ZPMCEdaGPjtjc6wZNAsBEpzCXzbM0wvamttdRp qFL00i6GPGw5UoBa93WdO4uW80+vaP2nutw/LwKluTurpcYBUxW8pAbE8fhr1w1RYRxhKVxt3 HT+/vR6HrFTBo7WDfY+MbBySCYD++0Wdz0QsEkdWJLm7ctUU9hzcJqBTMIKjAGdaVpo37d3AD mRNIvoKo62Q4/zz8HhMoU0FQdSetGcri26tevKkt9l4KikSL4wOuPsST0tr69YqVrgcVgzF22 +V1yiuUtuLwAt/ugNS6K6nKEqEJvVj4RBXVMM65FY/cjPMTxqDrCWBbqqeOBj7vhoLHMvE8St NFOraaDm6HFe+AkhgJARAGBMLUYhnge9RaJBRR25cyJyxaRE0LUUIBEKUzPp4HSO1nsFtEWuQ 9Bkw1DY/URAci10xnfO4M3F5hP1e+OOcmOlhE+V8vtziqpcgbdCU9OZ1YbkOnq0pEVJ08CSYc rc/ngKrFD5pK+v45Kh1oKYzooYfgrtaaXRAdzZmKGka4RXtGgn7etgDRNjSM/XaWxgK0XmKkw Sp/xgUJie7+imAetJyXn6jXjV14HtyyqgV4WUPsCFFXwibYETjtOLmrT3eXFMYpC12WseKotV jpdjAT5MMl/74tC5GVYZpp1hjPswSP3wr1EcRlaWd58P0++zn5yiuZJagiOEELf8bYtx7wUqI /B4b2Dbt883pMpM4aFqA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CONFIG_SND_SOC_SOF_IMX depends on CONFIG_SND_SOC_SOF, but is in turn referenced by the sof-of-dev driver. This creates a reverse dependency that manifests in a link error when CONFIG_SND_SOC_SOF_OF is built-in but CONFIG_SND_SOC_SOF_IMX=m: sound/soc/sof/sof-of-dev.o:(.data+0x118): undefined reference to `sof_imx8_ops' Make the latter a 'bool' symbol and change the Makefile so the imx8 driver is compiled the same way as the driver using it. A nicer way would be to reverse the layering and move all the imx specific bits of sof-of-dev.c into the imx driver itself, which can then call into the common code. Doing this would need more testing and can be done if we add another driver like the first one. Fixes: f4df4e4042b0 ("ASoC: SOF: imx8: Fix COMPILE_TEST error") Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support") Signed-off-by: Arnd Bergmann --- sound/soc/sof/imx/Kconfig | 2 +- sound/soc/sof/imx/Makefile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.20.0 Acked-by: Daniel Baluta diff --git a/sound/soc/sof/imx/Kconfig b/sound/soc/sof/imx/Kconfig index 5acae75f5750..a3891654a1fc 100644 --- a/sound/soc/sof/imx/Kconfig +++ b/sound/soc/sof/imx/Kconfig @@ -12,7 +12,7 @@ config SND_SOC_SOF_IMX_TOPLEVEL if SND_SOC_SOF_IMX_TOPLEVEL config SND_SOC_SOF_IMX8 - tristate "SOF support for i.MX8" + bool "SOF support for i.MX8" depends on IMX_SCU depends on IMX_DSP help diff --git a/sound/soc/sof/imx/Makefile b/sound/soc/sof/imx/Makefile index 6ef908e8c807..9e8f35df0ff2 100644 --- a/sound/soc/sof/imx/Makefile +++ b/sound/soc/sof/imx/Makefile @@ -1,4 +1,6 @@ # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) snd-sof-imx8-objs := imx8.o -obj-$(CONFIG_SND_SOC_SOF_IMX8) += snd-sof-imx8.o +ifdef CONFIG_SND_SOC_SOF_IMX8 +obj-$(CONFIG_SND_SOC_SOF_OF) += snd-sof-imx8.o +endif