diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-08 14:35:06 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-12-08 14:35:06 +0100 |
commit | 73718ca8bbd9619f9d42780499c63b32fd074052 (patch) | |
tree | f7c4eb6a96efbab032ee3bb1d9a134796a1b81bc /linux/drivers/media/video/ivtv/ivtv-irq.c | |
parent | d3cfa593f943f1404d84c0a16d57507541e1f2b1 (diff) | |
download | mediapointer-dvb-s2-73718ca8bbd9619f9d42780499c63b32fd074052.tar.gz mediapointer-dvb-s2-73718ca8bbd9619f9d42780499c63b32fd074052.tar.bz2 |
ivtv: Some general fixes
From: Richard Knutsson <ricknu-0@student.ltu.se>
Fix "warning: Using plain integer as NULL pointer".
Convert 'x < y ? x : y' to use min() instead.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-irq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-irq.c b/linux/drivers/media/video/ivtv/ivtv-irq.c index 42f9b3402..46a5cbc62 100644 --- a/linux/drivers/media/video/ivtv/ivtv-irq.c +++ b/linux/drivers/media/video/ivtv/ivtv-irq.c @@ -210,7 +210,7 @@ static int stream_enc_dma_append(struct ivtv_stream *s, u32 data[CX2341X_MBOX_MA s->sg_pending[idx].dst = buf->dma_handle; s->sg_pending[idx].src = offset; s->sg_pending[idx].size = s->buf_size; - buf->bytesused = (size < s->buf_size) ? size : s->buf_size; + buf->bytesused = min(size, s->buf_size); buf->dma_xfer_cnt = s->dma_xfer_cnt; s->q_predma.bytesused += buf->bytesused; @@ -742,7 +742,7 @@ static void ivtv_irq_dec_data_req(struct ivtv *itv) s = &itv->streams[IVTV_DEC_STREAM_TYPE_YUV]; } else { - itv->dma_data_req_size = data[2] >= 0x10000 ? 0x10000 : data[2]; + itv->dma_data_req_size = min_t(u32, data[2], 0x10000); itv->dma_data_req_offset = data[1]; s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG]; } |