diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-03 15:46:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-09-03 17:59:25 -0300 |
commit | 160ac0babc0d8c382bdf32db238bf16a3d3fa0a5 (patch) | |
tree | 248d61c9911d3d3c23464b80c589f22d8b163ef4 /drivers/media/platform/omap/omap_vout.c | |
parent | 1b21e2187adea385d9de53c8c861d9f56ea5bebe (diff) | |
download | op-kernel-dev-160ac0babc0d8c382bdf32db238bf16a3d3fa0a5.zip op-kernel-dev-160ac0babc0d8c382bdf32db238bf16a3d3fa0a5.tar.gz |
[media] omap: simplify test logic
instead of testing bools if they are false or true, just use
if (!foo) or if (foo). That makes the code easier to
read and shorter.
Also, properly initialize booleans with true or false.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/omap/omap_vout.c')
-rw-r--r-- | drivers/media/platform/omap/omap_vout.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index d9258f3..64ab6fb 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c @@ -989,7 +989,7 @@ static int omap_vout_release(struct file *file) mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_VSYNC2; omap_dispc_unregister_isr(omap_vout_isr, vout, mask); - vout->streaming = 0; + vout->streaming = false; videobuf_streamoff(q); videobuf_queue_cancel(q); @@ -1644,7 +1644,7 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) vout->field_id = 0; /* set flag here. Next QBUF will start DMA */ - vout->streaming = 1; + vout->streaming = true; vout->first_int = 1; @@ -1704,7 +1704,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i) if (!vout->streaming) return -EINVAL; - vout->streaming = 0; + vout->streaming = false; mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_VSYNC2; @@ -1912,7 +1912,7 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout) control[0].id = V4L2_CID_ROTATE; control[0].value = 0; vout->rotation = 0; - vout->mirror = 0; + vout->mirror = false; vout->control[2].id = V4L2_CID_HFLIP; vout->control[2].value = 0; if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) |