sound: convert "sound" subdirectory to UTF-8
[powerpc.git] / sound / oss / es1371.c
index a2ffe72..593a3aa 100644 (file)
  *                       Tjeerd Mulder <tjeerd.mulder@fujitsu-siemens.com>
  *    05.01.2001   0.29  Hopefully updates will not be required anymore when Creative bumps
  *                       the CT5880 revision.
- *                       suggested by Stephan Müller <smueller@chronox.de>
+ *                       suggested by Stephan Müller <smueller@chronox.de>
  *    31.01.2001   0.30  Register/Unregister gameport
  *                       Fix SETTRIGGER non OSS API conformity
  *    14.07.2001   0.31  Add list of laptops needing amplifier control
 #include <linux/wait.h>
 #include <linux/dma-mapping.h>
 #include <linux/mutex.h>
+#include <linux/mm.h>
+#include <linux/kernel.h>
 
 #include <asm/io.h>
 #include <asm/page.h>
@@ -1100,9 +1102,9 @@ static void es1371_handle_midi(struct es1371_state *s)
        outb((s->midi.ocnt > 0) ? UCTRL_RXINTEN | UCTRL_ENA_TXINT : UCTRL_RXINTEN, s->io+ES1371_REG_UART_CONTROL);
 }
 
-static irqreturn_t es1371_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t es1371_interrupt(int irq, void *dev_id)
 {
-        struct es1371_state *s = (struct es1371_state *)dev_id;
+        struct es1371_state *s = dev_id;
        unsigned int intsrc, sctl;
        
        /* fastpath out, to ease interrupt sharing */
@@ -2869,11 +2871,10 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic
                printk(KERN_WARNING "es1371: architecture does not support 32bit PCI busmaster DMA\n");
                return i;
        }
-       if (!(s = kmalloc(sizeof(struct es1371_state), GFP_KERNEL))) {
+       if (!(s = kzalloc(sizeof(struct es1371_state), GFP_KERNEL))) {
                printk(KERN_WARNING PFX "out of memory\n");
                return -ENOMEM;
        }
-       memset(s, 0, sizeof(struct es1371_state));
        
        s->codec = ac97_alloc_codec();
        if(s->codec == NULL)
@@ -2997,7 +2998,7 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic
        set_fs(KERNEL_DS);
        val = SOUND_MASK_LINE;
        mixdev_ioctl(s->codec, SOUND_MIXER_WRITE_RECSRC, (unsigned long)&val);
-       for (i = 0; i < sizeof(initvol)/sizeof(initvol[0]); i++) {
+       for (i = 0; i < ARRAY_SIZE(initvol); i++) {
                val = initvol[i].vol;
                mixdev_ioctl(s->codec, initvol[i].mixch, (unsigned long)&val);
        }