ppc64: use usercopy_64.c from powerpc/lib
[linux-2.6.git] / sound / isa / sscape.c
index 3959ed694eeccad24490825e6c1bd63917c4f92e..9f6b58c79209cbc4f217a0b9dd700bf0270e37b0 100644 (file)
@@ -1262,11 +1262,6 @@ static int __devinit create_sscape(const struct params *params, snd_card_t **rca
         */
        sscape_write(sscape, GA_INTENA_REG, 0x80);
 
-       if ((err = snd_card_register(card)) < 0) {
-               printk(KERN_ERR "sscape: Failed to register sound card\n");
-               goto _release_card;
-       }
-
        /*
         * Initialize mixer
         */
@@ -1396,6 +1391,13 @@ static int __devinit sscape_pnp_detect(struct pnp_card_link *pcard,
                        if (ret < 0)
                                return ret;
                        snd_card_set_dev(card, &pcard->card->dev);
+
+                       if ((ret = snd_card_register(card)) < 0) {
+                               printk(KERN_ERR "sscape: Failed to register sound card\n");
+                               snd_card_free(card);
+                               return ret;
+                       }
+
                        pnp_set_card_drvdata(pcard, card);
                        ++sscape_cards;
                        ++idx;
@@ -1460,6 +1462,16 @@ static int __init sscape_manual_probe(struct params *params)
                if (ret < 0)
                        return ret;
 
+               if ((ret = snd_card_set_generic_dev(card)) < 0) {
+                       snd_card_free(card);
+                       return ret;
+               }
+               if ((ret = snd_card_register(card)) < 0) {
+                       printk(KERN_ERR "sscape: Failed to register sound card\n");
+                       snd_card_free(card);
+                       return ret;
+               }
+
                sscape_card[sscape_cards] = card;
                params++;
                sscape_cards++;