[PATCH] PCI: removed unneeded .owner field from struct pci_driver
[safe/jmp/linux-2.6] / sound / pci / ens1370.c
index 0c64e65..2daa575 100644 (file)
@@ -100,13 +100,6 @@ MODULE_PARM_DESC(joystick, "Enable joystick.");
 #endif
 #endif /* SUPPORT_JOYSTICK */
 
-#ifndef PCI_DEVICE_ID_ENSONIQ_CT5880
-#define PCI_DEVICE_ID_ENSONIQ_CT5880    0x5880
-#endif
-#ifndef PCI_DEVICE_ID_ENSONIQ_ES1371
-#define PCI_DEVICE_ID_ENSONIQ_ES1371   0x1371
-#endif
-
 /* ES1371 chip ID */
 /* This is a little confusing because all ES1371 compatible chips have the
    same DEVICE_ID, the only thing differentiating them is the REV_ID field.
@@ -515,7 +508,7 @@ static unsigned int snd_es1371_wait_src_ready(ensoniq_t * ensoniq)
                        return r;
                cond_resched();
        }
-       snd_printk("wait source ready timeout 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_SMPRATE), r);
+       snd_printk(KERN_ERR "wait source ready timeout 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_SMPRATE), r);
        return 0;
 }
 
@@ -583,10 +576,9 @@ static void snd_es1370_codec_write(ak4531_t *ak4531,
                        outw(ES_1370_CODEC_WRITE(reg, val), ES_REG(ensoniq, 1370_CODEC));
                        return;
                }
-               set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(1);
+               schedule_timeout_uninterruptible(1);
        } while (time_after(end_time, jiffies));
-       snd_printk("codec write timeout, status = 0x%x\n", inl(ES_REG(ensoniq, STATUS)));
+       snd_printk(KERN_ERR "codec write timeout, status = 0x%x\n", inl(ES_REG(ensoniq, STATUS)));
 }
 
 #endif /* CHIP1370 */
@@ -627,7 +619,7 @@ static void snd_es1371_codec_write(ac97_t *ac97,
                }
        }
        up(&ensoniq->src_mutex);
-       snd_printk("codec write timeout at 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
+       snd_printk(KERN_ERR "codec write timeout at 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
 }
 
 static unsigned short snd_es1371_codec_read(ac97_t *ac97,
@@ -674,14 +666,14 @@ static unsigned short snd_es1371_codec_read(ac97_t *ac97,
                        }
                        up(&ensoniq->src_mutex);
                        if (++fail > 10) {
-                               snd_printk("codec read timeout (final) at 0x%lx, reg = 0x%x [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), reg, inl(ES_REG(ensoniq, 1371_CODEC)));
+                               snd_printk(KERN_ERR "codec read timeout (final) at 0x%lx, reg = 0x%x [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), reg, inl(ES_REG(ensoniq, 1371_CODEC)));
                                return 0;
                        }
                        goto __again;
                }
        }
        up(&ensoniq->src_mutex);
-       snd_printk("es1371: codec read timeout at 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
+       snd_printk(KERN_ERR "es1371: codec read timeout at 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
        return 0;
 }
 
@@ -1444,9 +1436,9 @@ static int snd_es1371_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 
 /* spdif controls */
 static snd_kcontrol_new_t snd_es1371_mixer_spdif[] __devinitdata = {
-       ES1371_SPDIF("IEC958 Playback Switch"),
+       ES1371_SPDIF(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH)),
        {
-               .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+               .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
                .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
                .info =         snd_ens1373_spdif_info,
                .get =          snd_ens1373_spdif_default_get,
@@ -1454,13 +1446,13 @@ static snd_kcontrol_new_t snd_es1371_mixer_spdif[] __devinitdata = {
        },
        {
                .access =       SNDRV_CTL_ELEM_ACCESS_READ,
-               .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+               .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
                .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
                .info =         snd_ens1373_spdif_info,
                .get =          snd_ens1373_spdif_mask_get
        },
        {
-               .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
+               .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
                .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),
                .info =         snd_ens1373_spdif_info,
                .get =          snd_ens1373_spdif_stream_get,
@@ -1950,7 +1942,7 @@ static int __devinit snd_ensoniq_create(snd_card_t * card,
        *rensoniq = NULL;
        if ((err = pci_enable_device(pci)) < 0)
                return err;
-       ensoniq = kcalloc(1, sizeof(*ensoniq), GFP_KERNEL);
+       ensoniq = kzalloc(sizeof(*ensoniq), GFP_KERNEL);
        if (ensoniq == NULL) {
                pci_disable_device(pci);
                return -ENOMEM;
@@ -1967,7 +1959,7 @@ static int __devinit snd_ensoniq_create(snd_card_t * card,
        }
        ensoniq->port = pci_resource_start(pci, 0);
        if (request_irq(pci->irq, snd_audiopci_interrupt, SA_INTERRUPT|SA_SHIRQ, "Ensoniq AudioPCI", (void *)ensoniq)) {
-               snd_printk("unable to grab IRQ %d\n", pci->irq);
+               snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_ensoniq_free(ensoniq);
                return -EBUSY;
        }
@@ -1975,7 +1967,7 @@ static int __devinit snd_ensoniq_create(snd_card_t * card,
 #ifdef CHIP1370
        if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
                                16, &ensoniq->dma_bug) < 0) {
-               snd_printk("unable to allocate space for phantom area - dma_bug\n");
+               snd_printk(KERN_ERR "unable to allocate space for phantom area - dma_bug\n");
                snd_ensoniq_free(ensoniq);
                return -EBUSY;
        }