Commit 661c7e44c5cc2828c7acb00cb71d985e129e3641
Committed by
Mauro Carvalho Chehab
1 parent
bfde287c2f
Exists in
master
and in
4 other branches
V4L/DVB (6192): Ensure start_dma() is capable of starting dma on port VIDB
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>
Showing 2 changed files with 12 additions and 7 deletions Side-by-side Diff
drivers/media/video/cx23885/cx23885-core.c
... | ... | @@ -1015,9 +1015,12 @@ |
1015 | 1015 | /* write TS length to chip */ |
1016 | 1016 | cx_write(port->reg_lngth, buf->vb.width); |
1017 | 1017 | |
1018 | - if (!(cx23885_boards[dev->board].portc & CX23885_MPEG_DVB)) { | |
1019 | - printk( "%s() Failed. Unsupported value in .portc (0x%08x)\n", | |
1020 | - __FUNCTION__, cx23885_boards[dev->board].portc ); | |
1018 | + if ( (!(cx23885_boards[dev->board].portb & CX23885_MPEG_DVB)) && | |
1019 | + (!(cx23885_boards[dev->board].portc & CX23885_MPEG_DVB)) ) { | |
1020 | + printk( "%s() Failed. Unsupported value in .portb/c (0x%08x)/(0x%08x)\n", | |
1021 | + __FUNCTION__, | |
1022 | + cx23885_boards[dev->board].portb, | |
1023 | + cx23885_boards[dev->board].portc ); | |
1021 | 1024 | return -EINVAL; |
1022 | 1025 | } |
1023 | 1026 |
drivers/media/video/cx23885/cx23885.h
... | ... | @@ -86,12 +86,14 @@ |
86 | 86 | u32 gpio0, gpio1, gpio2, gpio3; |
87 | 87 | }; |
88 | 88 | |
89 | +typedef enum { | |
90 | + CX23885_MPEG_UNDEFINED = 0, | |
91 | + CX23885_MPEG_DVB | |
92 | +} port_t; | |
93 | + | |
89 | 94 | struct cx23885_board { |
90 | 95 | char *name; |
91 | - enum { | |
92 | - CX23885_MPEG_UNDEFINED = 0, | |
93 | - CX23885_MPEG_DVB | |
94 | - } portc; | |
96 | + port_t portb, portc; | |
95 | 97 | struct cx23885_input input[MAX_CX23885_INPUT]; |
96 | 98 | }; |
97 | 99 |