From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765331AbXJRO00 (ORCPT ); Thu, 18 Oct 2007 10:26:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763523AbXJRO0S (ORCPT ); Thu, 18 Oct 2007 10:26:18 -0400 Received: from mx1.suse.de ([195.135.220.2]:48819 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762135AbXJRO0R (ORCPT ); Thu, 18 Oct 2007 10:26:17 -0400 Date: Thu, 18 Oct 2007 15:37:40 +0200 Message-ID: From: Takashi Iwai To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela , Andrew Morton Subject: Re: [patch] snd: fix build bug with CONFIG_SND_HDA_CODEC_SIGMATEL=y && !CONFIG_SND_HDA_GENERIC In-Reply-To: <20071018095042.GA21361@elte.hu> References: <20071018095042.GA21361@elte.hu> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) 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 X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 18 Oct 2007 11:50:42 +0200, Ingo Molnar wrote: > > > fix build bug introduced with the recent sound merge: > > --------------> > Subject: snd: fix build bug with CONFIG_SND_HDA_CODEC_SIGMATEL=y && !CONFIG_SND_HDA_GENERIC > From: Ingo Molnar > > randconfig build testing found this build bug: > > sound/built-in.o: In function `patch_stac9872': > patch_sigmatel.c:(.text+0x6d6e7): undefined reference to `snd_hda_parse_generic_codec' > > patch_sigmatel.c depends on SND_HDA_GENERIC, for snd_hda_parse_generic_codec(). > > to make it selectable, reorder SND_HDA_CODEC_SIGMATEL to after > SND_HDA_GENERIC. > > with this fixed, the kernel builds fine. > > Signed-off-by: Ingo Molnar Thanks for the patch. But, I'd like to avoid the reverse selection in that config as much as possible, which will give messy dependencies. Is the patch below OK? Takashi diff -r fb9512ce24e0 sound/pci/hda/patch_sigmatel.c --- a/sound/pci/hda/patch_sigmatel.c Thu Oct 18 10:48:43 2007 +0200 +++ b/sound/pci/hda/patch_sigmatel.c Thu Oct 18 16:23:22 2007 +0200 @@ -3062,9 +3062,16 @@ static int patch_stac9872(struct hda_cod board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS, stac9872_models, stac9872_cfg_tbl); - if (board_config < 0) + if (board_config < 0) { + printk(KERN_WARNING "hda-codec: " + "found unknown STAC9872 device\n"); +#ifdef CONFIG_SND_HDA_GENERIC /* unknown config, let generic-parser do its job... */ return snd_hda_parse_generic_codec(codec); +#else + return -ENODEV; +#endif + } spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (spec == NULL)