From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751802AbdGaJQC (ORCPT ); Mon, 31 Jul 2017 05:16:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:36650 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751075AbdGaJQA (ORCPT ); Mon, 31 Jul 2017 05:16:00 -0400 Date: Mon, 31 Jul 2017 11:15:57 +0200 Message-ID: From: Takashi Iwai To: "Arnd Bergmann" Cc: "Liam Girdwood" , "Mark Brown" , , "Matthias Brugger" , "Hsin-yu Chao" , "Harsha Priya N" , "Naveen M" , "Vinod Koul" , , , , "Ryder Lee" , "Charles Keepax" , "Jaroslav Kysela" , "Sugar Zhang" , "Xing Zheng" , "Heiko Stuebner" , Subject: Re: [PATCH] ASoC: improve RT5514 dependencies In-Reply-To: <20170731083217.4142512-1-arnd@arndb.de> References: <20170731083217.4142512-1-arnd@arndb.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 31 Jul 2017 10:30:55 +0200, Arnd Bergmann wrote: > > With SND_SOC_RT5514_SPI=m and SND_SOC_RT5514=y, we get this link error: > > sound/soc/codecs/rt5514.o: In function `rt5514_dsp_voice_wake_up_put': > rt5514.c:(.text+0x2068): undefined reference to `rt5514_spi_burst_write' > rt5514.c:(.text+0x20c8): undefined reference to `rt5514_spi_burst_write' > > This adds another Kconfig symbol to work around the link error, forcing > the main driver to be a loadable module as well if some other driver > selects the I2C side to be built-in. > > Fixes: 2a18483a7fb4 ("ASoC: Intel: Add Kabylake machine driver for RT5514, RT5663 and MAX98927") > Signed-off-by: Arnd Bergmann > --- > This can now lead to a configuration with > SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH=y and SND_SOC_RT5514=m. I > don't know if that is a problem or not. > > An alternative approach would be to flip the dependency between > rt5514_spi.ko and rt5514.ko and avoid having the rt5514_spi_burst_write > symbol exported. The current usage of #if defined(CONFIG_SND_SOC_RT5514_SPI) in rt5514_dsp_voice_wake_up_put() is already broken. We need the fix in anyway. IMO, flipping the dependency looks saner to me. The SPI function call is a kind of add-on, after all. thanks, Takashi