[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071018145458.GA1040@elte.hu>
Date: Thu, 18 Oct 2007 16:54:58 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Takashi Iwai <tiwai@...e.de>
Cc: linux-kernel@...r.kernel.org, Jaroslav Kysela <perex@...ex.cz>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch] snd: fix build bug with
CONFIG_SND_HDA_CODEC_SIGMATEL=y && !CONFIG_SND_HDA_GENERIC
* Takashi Iwai <tiwai@...e.de> wrote:
> +++ 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
pushing an #ifdef into a driver is quite unclean, if then you should
define snd_hda_parse_generic_codec() in a header as a -ENODEV inline
function if !CONFIG_SND_HDA_GENERIC.
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists