diff options
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp_cmd.c')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_cmd.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 8ea65bef35d2..592ea990d4ca 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -654,8 +654,7 @@ bool atomisp_buffers_queued(struct atomisp_sub_device *asd) return asd->video_out_capture.buffers_in_css || asd->video_out_vf.buffers_in_css || asd->video_out_preview.buffers_in_css || - asd->video_out_video_capture.buffers_in_css ? - true : false; + asd->video_out_video_capture.buffers_in_css; } /* ISP2401 */ @@ -877,7 +876,8 @@ static struct atomisp_video_pipe *__atomisp_get_pipe( enum atomisp_metadata_type atomisp_get_metadata_type(struct atomisp_sub_device *asd, - enum ia_css_pipe_id pipe_id) { + enum ia_css_pipe_id pipe_id) +{ if (!asd->continuous_mode->val) return ATOMISP_MAIN_METADATA; @@ -1211,8 +1211,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error, default: break; } - if (vb) - { + if (vb) { vb->ts = ktime_get_ns(); vb->field_count = atomic_read(&asd->sequence) << 1; /*mark videobuffer done for dequeue*/ @@ -1234,8 +1233,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error, * Requeue should only be done for 3a and dis buffers. * Queue/dequeue order will change if driver recycles image buffers. */ - if (requeue) - { + if (requeue) { err = atomisp_css_queue_buffer(asd, stream_id, css_pipe_id, buf_type, &buffer); @@ -1940,9 +1938,9 @@ int atomisp_get_frame_pgnr(struct atomisp_device *isp, * Get internal fmt according to V4L2 fmt */ static enum ia_css_frame_format -v4l2_fmt_to_sh_fmt(u32 fmt) { - switch (fmt) - { +v4l2_fmt_to_sh_fmt(u32 fmt) +{ + switch (fmt) { case V4L2_PIX_FMT_YUV420: return IA_CSS_FRAME_FORMAT_YUV420; case V4L2_PIX_FMT_YVU420: @@ -2812,7 +2810,6 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag, struct atomisp_metadata *md) { struct atomisp_device *isp = asd->isp; - struct ia_css_stream_config *stream_config; struct ia_css_stream_info *stream_info; struct camera_mipi_info *mipi_info; struct atomisp_metadata_buf *md_buf; @@ -2822,8 +2819,6 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag, if (flag != 0) return -EINVAL; - stream_config = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. - stream_config; stream_info = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. stream_info; @@ -2891,7 +2886,6 @@ int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag, struct atomisp_metadata_with_type *md) { struct atomisp_device *isp = asd->isp; - struct ia_css_stream_config *stream_config; struct ia_css_stream_info *stream_info; struct camera_mipi_info *mipi_info; struct atomisp_metadata_buf *md_buf; @@ -2901,8 +2895,6 @@ int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag, if (flag != 0) return -EINVAL; - stream_config = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. - stream_config; stream_info = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]. stream_info; @@ -4981,10 +4973,9 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp, case ATOMISP_CAMERA_PORT_SECONDARY: return MIPI_PORT1_ID; case ATOMISP_CAMERA_PORT_TERTIARY: - if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) { + if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID) return MIPI_PORT1_ID + 1; - } - /* fall through */ + fallthrough; default: dev_err(isp->dev, "unsupported port: %d\n", port); return MIPI_PORT0_ID; @@ -6557,7 +6548,7 @@ int atomisp_enable_dz_capt_pipe(struct atomisp_sub_device *asd, if (!enable) return -EINVAL; - value = *enable > 0 ? true : false; + value = *enable > 0; atomisp_en_dz_capt_pipe(asd, value); |