All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Takashi Iwai <tiwai@suse.de>
Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch] snd: fix build bug with CONFIG_SND_HDA_CODEC_SIGMATEL=y && !CONFIG_SND_HDA_GENERIC
Date: Thu, 18 Oct 2007 16:54:58 +0200	[thread overview]
Message-ID: <20071018145458.GA1040@elte.hu> (raw)
In-Reply-To: <s5h64141r2z.wl%tiwai@suse.de>


* Takashi Iwai <tiwai@suse.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

  reply	other threads:[~2007-10-18 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18  9:50 [patch] snd: fix build bug with CONFIG_SND_HDA_CODEC_SIGMATEL=y && !CONFIG_SND_HDA_GENERIC Ingo Molnar
2007-10-18 13:37 ` Takashi Iwai
2007-10-18 14:54   ` Ingo Molnar [this message]
2007-10-18 14:18     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071018145458.GA1040@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.