From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933375AbcHBClg (ORCPT ); Mon, 1 Aug 2016 22:41:36 -0400 Received: from mail-oi0-f51.google.com ([209.85.218.51]:34338 "EHLO mail-oi0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933323AbcHBCl1 (ORCPT ); Mon, 1 Aug 2016 22:41:27 -0400 MIME-Version: 1.0 In-Reply-To: <877fc0hte3.wl%kuninori.morimoto.gx@renesas.com> References: <20160801233610.10479-1-khilman@baylibre.com> <877fc0hte3.wl%kuninori.morimoto.gx@renesas.com> From: Kevin Hilman Date: Mon, 1 Aug 2016 19:40:10 -0700 Message-ID: Subject: Re: [PATCH] ASoC: simple-card: fix module load "unknown symbol" issue To: Kuninori Morimoto Cc: Liam Girdwood , Mark Brown , alsa-devel@alsa-project.org, Sekhar Nori , Jaroslav Kysela , Takashi Iwai , open list Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 1, 2016 at 6:13 PM, Kuninori Morimoto wrote: > > Hi Kevin > > Thank you for your patch > >> An ASoC driver using simple-card, when built as a module gets the >> following error at module load time: >> >> [ 23.571873] simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0) >> [ 23.712726] simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0) >> >> fix this by including simple-card-utils.o symbols in the module build >> its symols are resolved correctly. >> >> Tested on Davinci DA850-EVM using snd_soc_edma, snc_soc_davinci_mcasp, >> with all of ASoC built as modules. >> >> Cc: Sekhar Nori >> Signed-off-by: Kevin Hilman >> --- > > Hmm... strange... > > simple-card-utils will be used not only simple-card in the future, > thus it should be build separately. > > And, snd_soc_of_parse_daifmt() and snd_soc_of_parse_card_name() are > already exported on soc-core.c ? > > I tried it as module, but no error for me The error I'm getting is not at build time, but at module load time. The various snd related modules are autoloaded by udev events, but during that time I see this: [ 23.571873] simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0) [ 23.712726] simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0) and my patch fixes that problem so that the module symbols resolve at load time. Kevin