aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/ad1816a
diff options
context:
space:
mode:
authorRask Ingemann Lambertsen <rask@sygehus.dk>2007-03-19 06:38:11 -0400
committerJaroslav Kysela <perex@suse.cz>2007-05-11 10:55:49 -0400
commit2944275b146f4c0bb229a862bd8b3930c157d2a1 (patch)
tree1587d26620f119b4bbd64dcde77d4ceaeeeada49 /sound/isa/ad1816a
parent1b60f6b0904737cb76cd4cd46b57592318c9a20e (diff)
[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: Rask Ingemann Lambertsen <rask@sygehus.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/isa/ad1816a')
-rw-r--r--sound/isa/ad1816a/ad1816a.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 59034507175b..fc88a31da6f5 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -129,8 +129,8 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar
129 } 129 }
130 acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL); 130 acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL);
131 if (acard->devmpu == NULL) { 131 if (acard->devmpu == NULL) {
132 kfree(cfg); 132 mpu_port[dev] = -1;
133 return -EBUSY; 133 snd_printk(KERN_WARNING PFX "MPU401 device busy, skipping.\n");
134 } 134 }
135 135
136 pdev = acard->dev; 136 pdev = acard->dev;
@@ -162,6 +162,10 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar
162 dma2[dev] = pnp_dma(pdev, 1); 162 dma2[dev] = pnp_dma(pdev, 1);
163 irq[dev] = pnp_irq(pdev, 0); 163 irq[dev] = pnp_irq(pdev, 0);
164 164
165 if (acard->devmpu == NULL) {
166 kfree(cfg);
167 return 0;
168 }
165 pdev = acard->devmpu; 169 pdev = acard->devmpu;
166 pnp_init_resource_table(cfg); 170 pnp_init_resource_table(cfg);
167 171