V4L/DVB (4667): Changed cx88_board .dvb and .register to an enum.
[pandora-kernel.git] / drivers / media / video / cx88 / cx88-mpeg.c
index a9d7795..957f37c 100644 (file)
@@ -65,8 +65,17 @@ static int cx8802_start_dma(struct cx8802_dev    *dev,
 
        /* FIXME: this needs a review.
         * also: move to cx88-blackbird + cx88-dvb source files? */
+       if (cx88_boards[core->board].mpeg == (CX88_BOARD_DVB | CX88_BOARD_BLACKBIRD) ) {
+               /* Report a warning until the mini driver patch is applied,
+                * else the following conditions will set the dma registers incorrectly.
+                * This will be removed in the next major patch and changes to the conditions
+                * will be made.
+                */
+               printk(KERN_INFO "%s() board->(CX88_BOARD_DVB | CX88_BOARD_BLACKBIRD) is invalid\n", __FUNCTION__);
+               return -EINVAL;
+       }
 
-       if (cx88_boards[core->board].dvb) {
+       if (cx88_boards[core->board].mpeg & CX88_BOARD_DVB) {
                /* negedge driven & software reset */
                cx_write(TS_GEN_CNTRL, 0x0040 | dev->ts_gen_cntrl);
                udelay(100);
@@ -92,7 +101,7 @@ static int cx8802_start_dma(struct cx8802_dev    *dev,
                udelay(100);
        }
 
-       if (cx88_boards[core->board].blackbird) {
+       if (cx88_boards[core->board].mpeg & CX88_BOARD_BLACKBIRD) {
                cx_write(MO_PINMUX_IO, 0x88); /* enable MPEG parallel IO */
 
                cx_write(TS_GEN_CNTRL, 0x46); /* punctured clock TS & posedge driven & software reset */
@@ -420,9 +429,9 @@ int cx8802_init_common(struct cx8802_dev *dev)
        pci_read_config_byte(dev->pci, PCI_CLASS_REVISION, &dev->pci_rev);
        pci_read_config_byte(dev->pci, PCI_LATENCY_TIMER,  &dev->pci_lat);
        printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, "
-              "latency: %d, mmio: 0x%lx\n", dev->core->name,
+              "latency: %d, mmio: 0x%llx\n", dev->core->name,
               pci_name(dev->pci), dev->pci_rev, dev->pci->irq,
-              dev->pci_lat,pci_resource_start(dev->pci,0));
+              dev->pci_lat,(unsigned long long)pci_resource_start(dev->pci,0));
 
        /* initialize driver struct */
        spin_lock_init(&dev->slock);
@@ -438,7 +447,7 @@ int cx8802_init_common(struct cx8802_dev *dev)
 
        /* get irq */
        err = request_irq(dev->pci->irq, cx8802_irq,
-                         SA_SHIRQ | SA_INTERRUPT, dev->core->name, dev);
+                         IRQF_SHARED | IRQF_DISABLED, dev->core->name, dev);
        if (err < 0) {
                printk(KERN_ERR "%s: can't get IRQ %d\n",
                       dev->core->name, dev->pci->irq);