Re: [patch] snd: fix build bug with CONFIG_SND_HDA_CODEC_SIGMATEL=y && !CONFIG_SND_HDA_GENERIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Takashi Iwai <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux