Commit 2944275b authored by Rask Ingemann Lambertsen's avatar Rask Ingemann Lambertsen Committed by Jaroslav Kysela

[ALSA] ad1816a: Fix modprobe snd_mpu401 && modprobe snd_ad1816a

   The ad1816a driver fails if the mpu401 driver has been loaded first. This
patch against linux 2.6.20 fixes it by just ignoring the MPU-401 device in
that case, so that the rest of the sound card can be used. The ad1816a
driver already handles the MPU-401 device being unavailable due to lack of
resources in the same way.
Signed-off-by: default avatarRask Ingemann Lambertsen <rask@sygehus.dk>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 1b60f6b0
...@@ -129,8 +129,8 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar ...@@ -129,8 +129,8 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar
} }
acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL); acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL);
if (acard->devmpu == NULL) { if (acard->devmpu == NULL) {
kfree(cfg); mpu_port[dev] = -1;
return -EBUSY; snd_printk(KERN_WARNING PFX "MPU401 device busy, skipping.\n");
} }
pdev = acard->dev; pdev = acard->dev;
...@@ -162,6 +162,10 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar ...@@ -162,6 +162,10 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar
dma2[dev] = pnp_dma(pdev, 1); dma2[dev] = pnp_dma(pdev, 1);
irq[dev] = pnp_irq(pdev, 0); irq[dev] = pnp_irq(pdev, 0);
if (acard->devmpu == NULL) {
kfree(cfg);
return 0;
}
pdev = acard->devmpu; pdev = acard->devmpu;
pnp_init_resource_table(cfg); pnp_init_resource_table(cfg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment