Skip to content

Commit

Permalink
ALSA: msnd - Fix build error with CONFIG_PNP=n
Browse files Browse the repository at this point in the history
  sound/isa/msnd/msnd_pinnacle.c:891: error: 'isapnp' undeclared (first use in this function)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Feb 4, 2009
1 parent 5aa13a9 commit 5e74762
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sound/isa/msnd/msnd_pinnacle.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,9 @@ static int calibrate_signal;
static int isapnp[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
module_param_array(isapnp, bool, NULL, 0444);
MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
#define has_isapnp(x) isapnp[x]
#else
#define has_isapnp(x) 0
#endif

MODULE_AUTHOR("Karsten Wiese <annabellesgarden@yahoo.de>");
Expand Down Expand Up @@ -888,7 +891,7 @@ static int __devinit snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
struct snd_card *card;
struct snd_msnd *chip;

if (isapnp[idx] || cfg[idx] == SNDRV_AUTO_PORT) {
if (has_isapnp(idx) || cfg[idx] == SNDRV_AUTO_PORT) {
printk(KERN_INFO LOGNAME ": Assuming PnP mode\n");
return -ENODEV;
}
Expand Down Expand Up @@ -1082,7 +1085,7 @@ static int __devinit snd_msnd_pnp_detect(struct pnp_card_link *pcard,
int ret;

for ( ; idx < SNDRV_CARDS; idx++) {
if (isapnp[idx])
if (has_isapnp(idx))
break;
}
if (idx >= SNDRV_CARDS)
Expand Down

0 comments on commit 5e74762

Please sign in to comment.