Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial
[powerpc.git] / sound / isa / gus / interwave.c
index de71b7a..ea69f25 100644 (file)
@@ -70,9 +70,9 @@ static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;     /* 0,1,3,5,6,7 */
 static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;      /* 0,1,3,5,6,7 */
 static int joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
                                /* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */
-static int midi[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int midi[SNDRV_CARDS];
 static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
-static int effect[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int effect[SNDRV_CARDS];
 
 #ifdef SNDRV_STB
 #define PFX "interwave-stb: "
@@ -611,10 +611,10 @@ static int __devinit snd_interwave_pnp(int dev, struct snd_interwave *iwcard,
        if (dma2[dev] >= 0)
                dma2[dev] = pnp_dma(pdev, 1);
        irq[dev] = pnp_irq(pdev, 0);
-       snd_printdd("isapnp IW: sb port=0x%lx, gf1 port=0x%lx, codec port=0x%lx\n",
-                               pnp_port_start(pdev, 0),
-                               pnp_port_start(pdev, 1),
-                               pnp_port_start(pdev, 2));
+       snd_printdd("isapnp IW: sb port=0x%llx, gf1 port=0x%llx, codec port=0x%llx\n",
+                       (unsigned long long)pnp_port_start(pdev, 0),
+                       (unsigned long long)pnp_port_start(pdev, 1),
+                       (unsigned long long)pnp_port_start(pdev, 2));
        snd_printdd("isapnp IW: dma1=%i, dma2=%i, irq=%i\n", dma1[dev], dma2[dev], irq[dev]);
 #ifdef SNDRV_STB
        /* Tone Control initialization */
@@ -706,7 +706,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev)
        if ((err = snd_gus_initialize(gus)) < 0)
                return err;
 
-       if (request_irq(xirq, snd_interwave_interrupt, SA_INTERRUPT,
+       if (request_irq(xirq, snd_interwave_interrupt, IRQF_DISABLED,
                        "InterWave", iwcard)) {
                snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
                return -EBUSY;
@@ -947,9 +947,11 @@ static int __init alsa_card_interwave_init(void)
 #endif
                device = platform_device_register_simple(INTERWAVE_DRIVER,
                                                         i, NULL, 0);
-               if (IS_ERR(device)) {
-                       err = PTR_ERR(device);
-                       goto errout;
+               if (IS_ERR(device))
+                       continue;
+               if (!platform_get_drvdata(device)) {
+                       platform_device_unregister(device);
+                       continue;
                }
                platform_devices[i] = device;
                cards++;
@@ -966,14 +968,10 @@ static int __init alsa_card_interwave_init(void)
 #ifdef MODULE
                printk(KERN_ERR "InterWave soundcard not found or device busy\n");
 #endif
-               err = -ENODEV;
-               goto errout;
+               snd_interwave_unregister_all();
+               return -ENODEV;
        }
        return 0;
-
- errout:
-       snd_interwave_unregister_all();
-       return err;
 }
 
 static void __exit alsa_card_interwave_exit(void)