Commit 9737153b authored by Leonid V. Fedorenchik's avatar Leonid V. Fedorenchik Committed by Greg Kroah-Hartman

Staging: cx25821: Replace :? by if-else in cx25821-video-upstream-ch2.c

Replace :? operator by if-else equivalent where it improves readability.
Signed-off-by: default avatarLeonid V. Fedorenchik <leonidsbox@gmail.com>
Reviewed-By: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
Reviewed-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 49acf735
...@@ -145,15 +145,16 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev, ...@@ -145,15 +145,16 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,
if (dev->_isNTSC_ch2) { if (dev->_isNTSC_ch2) {
odd_num_lines = singlefield_lines + 1; odd_num_lines = singlefield_lines + 1;
risc_program_size = FRAME1_VID_PROG_SIZE; risc_program_size = FRAME1_VID_PROG_SIZE;
frame_size = if (bpl == Y411_LINE_SZ)
(bpl == frame_size = FRAME_SIZE_NTSC_Y411;
Y411_LINE_SZ) ? FRAME_SIZE_NTSC_Y411 : else
FRAME_SIZE_NTSC_Y422; frame_size = FRAME_SIZE_NTSC_Y422;
} else { } else {
risc_program_size = PAL_VID_PROG_SIZE; risc_program_size = PAL_VID_PROG_SIZE;
frame_size = if (bpl == Y411_LINE_SZ)
(bpl == frame_size = FRAME_SIZE_PAL_Y411;
Y411_LINE_SZ) ? FRAME_SIZE_PAL_Y411 : FRAME_SIZE_PAL_Y422; else
frame_size = FRAME_SIZE_PAL_Y422;
} }
/* Virtual address of Risc buffer program */ /* Virtual address of Risc buffer program */
...@@ -565,10 +566,10 @@ int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num, ...@@ -565,10 +566,10 @@ int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num,
} }
if (dev->_dma_virt_start_addr_ch2 != NULL) { if (dev->_dma_virt_start_addr_ch2 != NULL) {
line_size_in_bytes = if (dev->_pixel_format_ch2 == PIXEL_FRMT_411)
(dev->_pixel_format_ch2 == line_size_in_bytes = Y411_LINE_SZ;
PIXEL_FRMT_411) ? Y411_LINE_SZ : else
Y422_LINE_SZ; line_size_in_bytes = Y422_LINE_SZ;
risc_phys_jump_addr = risc_phys_jump_addr =
dev->_dma_phys_start_addr_ch2 + dev->_dma_phys_start_addr_ch2 +
odd_risc_prog_size; odd_risc_prog_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment