[ALSA] es1938 - Fix resume
[powerpc.git] / sound / pci / sonicvibes.c
index 60ecb2b..4f64814 100644 (file)
@@ -50,13 +50,6 @@ MODULE_SUPPORTED_DEVICE("{{S3,SonicVibes PCI}}");
 #define SUPPORT_JOYSTICK 1
 #endif
 
-#ifndef PCI_VENDOR_ID_S3
-#define PCI_VENDOR_ID_S3             0x5333
-#endif
-#ifndef PCI_DEVICE_ID_S3_SONICVIBES
-#define PCI_DEVICE_ID_S3_SONICVIBES  0xca00
-#endif
-
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;     /* Index 0-MAX */
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;      /* ID for this card */
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;     /* Enable this card */
@@ -1212,14 +1205,8 @@ static int snd_sonicvibes_free(sonicvibes_t *sonic)
        pci_write_config_dword(sonic->pci, 0x48, sonic->dmac_port);
        if (sonic->irq >= 0)
                free_irq(sonic->irq, (void *)sonic);
-       if (sonic->res_dmaa) {
-               release_resource(sonic->res_dmaa);
-               kfree_nocheck(sonic->res_dmaa);
-       }
-       if (sonic->res_dmac) {
-               release_resource(sonic->res_dmac);
-               kfree_nocheck(sonic->res_dmac);
-       }
+       release_and_free_resource(sonic->res_dmaa);
+       release_and_free_resource(sonic->res_dmac);
        pci_release_regions(sonic->pci);
        pci_disable_device(sonic->pci);
        kfree(sonic);
@@ -1257,7 +1244,7 @@ static int __devinit snd_sonicvibes_create(snd_card_t * card,
                 return -ENXIO;
         }
 
-       sonic = kcalloc(1, sizeof(*sonic), GFP_KERNEL);
+       sonic = kzalloc(sizeof(*sonic), GFP_KERNEL);
        if (sonic == NULL) {
                pci_disable_device(pci);
                return -ENOMEM;
@@ -1515,6 +1502,7 @@ static void __devexit snd_sonic_remove(struct pci_dev *pci)
 
 static struct pci_driver driver = {
        .name = "S3 SonicVibes",
+       .owner = THIS_MODULE,
        .id_table = snd_sonic_ids,
        .probe = snd_sonic_probe,
        .remove = __devexit_p(snd_sonic_remove),