libata: convert ata_pci_init_native_mode() users to new init model
[powerpc.git] / sound / isa / sb / sb16.c
index 21ea659..d64e67f 100644 (file)
@@ -85,7 +85,7 @@ static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;     /* 0,1,3 */
 static int dma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;     /* 5,6,7 */
 static int mic_agc[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
 #ifdef CONFIG_SND_SB16_CSP
-static int csp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int csp[SNDRV_CARDS];
 #endif
 #ifdef SNDRV_SBAWE_EMU8000
 static int seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4};
@@ -327,7 +327,8 @@ static int __devinit snd_card_sb16_pnp(int dev, struct snd_card_sb16 *acard,
                        goto __wt_error; 
                } 
                awe_port[dev] = pnp_port_start(pdev, 0);
-               snd_printdd("pnp SB16: wavetable port=0x%lx\n", pnp_port_start(pdev, 0));
+               snd_printdd("pnp SB16: wavetable port=0x%llx\n",
+                               (unsigned long long)pnp_port_start(pdev, 0));
        } else {
 __wt_error:
                if (pdev) {
@@ -720,9 +721,11 @@ static int __init alsa_card_sb16_init(void)
                        continue;
                device = platform_device_register_simple(SND_SB16_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++;
@@ -745,14 +748,10 @@ static int __init alsa_card_sb16_init(void)
                snd_printk(KERN_ERR "In case, if you have AWE card, try snd-sbawe module\n");
 #endif
 #endif
-               err = -ENODEV;
-               goto errout;
+               snd_sb16_unregister_all();
+               return -ENODEV;
        }
        return 0;
-
- errout:
-       snd_sb16_unregister_all();
-       return err;
 }
 
 static void __exit alsa_card_sb16_exit(void)