[ALSA] snd-ca0106: Fixes sound output for Creative Audigy SE aka.SB0570.
[powerpc.git] / sound / pci / trident / trident.c
index ad58e08..2b21df1 100644 (file)
@@ -76,8 +76,8 @@ static int __devinit snd_trident_probe(struct pci_dev *pci,
                                       const struct pci_device_id *pci_id)
 {
        static int dev;
-       snd_card_t *card;
-       trident_t *trident;
+       struct snd_card *card;
+       struct snd_trident *trident;
        const char *str;
        int err, pcm_dev = 0;
 
@@ -100,6 +100,7 @@ static int __devinit snd_trident_probe(struct pci_dev *pci,
                snd_card_free(card);
                return err;
        }
+       card->private_data = trident;
 
        switch (trident->device) {
        case TRIDENT_DEVICE_ID_DX:
@@ -143,7 +144,8 @@ static int __devinit snd_trident_probe(struct pci_dev *pci,
                        return err;
                }
        }
-       if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_TRID4DWAVE,
+       if (trident->device != TRIDENT_DEVICE_ID_SI7018 &&
+           (err = snd_mpu401_uart_new(card, 0, MPU401_HW_TRID4DWAVE,
                                       trident->midi_port, 1,
                                       trident->irq, 0, &trident->rmidi)) < 0) {
                snd_card_free(card);
@@ -179,12 +181,15 @@ static struct pci_driver driver = {
        .id_table = snd_trident_ids,
        .probe = snd_trident_probe,
        .remove = __devexit_p(snd_trident_remove),
-       SND_PCI_PM_CALLBACKS
+#ifdef CONFIG_PM
+       .suspend = snd_trident_suspend,
+       .resume = snd_trident_resume,
+#endif
 };
 
 static int __init alsa_card_trident_init(void)
 {
-       return pci_module_init(&driver);
+       return pci_register_driver(&driver);
 }
 
 static void __exit alsa_card_trident_exit(void)