include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / media / video / cx88 / cx88-alsa.c
index ce98d95..33082c9 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/vmalloc.h>
 #include <linux/dma-mapping.h>
 #include <linux/pci.h>
+#include <linux/slab.h>
 
 #include <asm/delay.h>
 #include <sound/core.h>
@@ -583,16 +584,18 @@ static int snd_cx88_volume_put(struct snd_kcontrol *kcontrol,
 {
        snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol);
        struct cx88_core *core=chip->core;
-       int v, b;
+       int left, right, v, b;
        int changed = 0;
        u32 old;
 
-       b = value->value.integer.value[1] - value->value.integer.value[0];
+       left = value->value.integer.value[0] & 0x3f;
+       right = value->value.integer.value[1] & 0x3f;
+       b = right - left;
        if (b < 0) {
-           v = 0x3f - value->value.integer.value[0];
+           v = 0x3f - left;
            b = (-b) | 0x40;
        } else {
-           v = 0x3f - value->value.integer.value[1];
+           v = 0x3f - right;
        }
        /* Do we really know this will always be called with IRQs on? */
        spin_lock_irq(&chip->reg_lock);
@@ -745,7 +748,7 @@ static int __devinit snd_cx88_create(struct snd_card *card,
                return err;
        }
 
-       if (!pci_dma_supported(pci,DMA_32BIT_MASK)) {
+       if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) {
                dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
                err = -EIO;
                cx88_core_put(core,pci);
@@ -871,7 +874,7 @@ static struct pci_driver cx88_audio_pci_driver = {
        .name     = "cx88_audio",
        .id_table = cx88_audio_pci_tbl,
        .probe    = cx88_audio_initdev,
-       .remove   = cx88_audio_finidev,
+       .remove   = __devexit_p(cx88_audio_finidev),
 };
 
 /****************************************************************************
@@ -881,7 +884,7 @@ static struct pci_driver cx88_audio_pci_driver = {
 /*
  * module init
  */
-static int cx88_audio_init(void)
+static int __init cx88_audio_init(void)
 {
        printk(KERN_INFO "cx2388x alsa driver version %d.%d.%d loaded\n",
               (CX88_VERSION_CODE >> 16) & 0xff,
@@ -897,9 +900,8 @@ static int cx88_audio_init(void)
 /*
  * module remove
  */
-static void cx88_audio_fini(void)
+static void __exit cx88_audio_fini(void)
 {
-
        pci_unregister_driver(&cx88_audio_pci_driver);
 }