]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (6192): Ensure start_dma() is capable of starting dma on port VIDB
authorSteven Toth <stoth@hauppauge.com>
Thu, 6 Sep 2007 19:07:49 +0000 (16:07 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:14:28 +0000 (22:14 -0300)
start_dma() would fail to start dma if a device used VIDB (portb).

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx23885/cx23885.h

index f5b73c4b625e04899bfadbaa6bfa9388e853810e..907ea4c2ea38d5b3cb71b9b5677ddc2245efd4ee 100644 (file)
@@ -1015,9 +1015,12 @@ static int cx23885_start_dma(struct cx23885_tsport *port,
        /* write TS length to chip */
        cx_write(port->reg_lngth, buf->vb.width);
 
-       if (!(cx23885_boards[dev->board].portc & CX23885_MPEG_DVB)) {
-               printk( "%s() Failed. Unsupported value in .portc (0x%08x)\n",
-                       __FUNCTION__, cx23885_boards[dev->board].portc );
+       if ( (!(cx23885_boards[dev->board].portb & CX23885_MPEG_DVB)) &&
+               (!(cx23885_boards[dev->board].portc & CX23885_MPEG_DVB)) ) {
+               printk( "%s() Failed. Unsupported value in .portb/c (0x%08x)/(0x%08x)\n",
+                       __FUNCTION__,
+                       cx23885_boards[dev->board].portb,
+                       cx23885_boards[dev->board].portc );
                return -EINVAL;
        }
 
index c0f4e4337351694e157241e89d7c3471e6de51e4..e44698a6bedece7b70c777a5bcee3150230b9365 100644 (file)
@@ -86,12 +86,14 @@ struct cx23885_input {
        u32             gpio0, gpio1, gpio2, gpio3;
 };
 
+typedef enum {
+       CX23885_MPEG_UNDEFINED = 0,
+       CX23885_MPEG_DVB
+} port_t;
+
 struct cx23885_board {
        char                    *name;
-       enum {
-               CX23885_MPEG_UNDEFINED = 0,
-               CX23885_MPEG_DVB
-       } portc;
+       port_t                  portb, portc;
        struct cx23885_input    input[MAX_CX23885_INPUT];
 };