Commit 5d986a0e authored by Kaixu Xia's avatar Kaixu Xia Committed by Mauro Carvalho Chehab

media: atomisp: make atomisp_css_continuous_set_num_raw_frames() void

The return value of atomisp_css_continuous_set_num_raw_frames() function
is always 0, so there's no reason for a return value. In addition, the
__enable_continuous_mode() checked the return value for possible error
which is unnecessary. Convert atomisp_css_continuous_set_num_raw_frames()
to a void function.

Link: https://lore.kernel.org/linux-media/1605362150-11401-1-git-send-email-kaixuxia@tencent.comReported-by: default avatarTosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: default avatarKaixu Xia <kaixuxia@tencent.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 19073450
......@@ -5083,11 +5083,8 @@ static int __enable_continuous_mode(struct atomisp_sub_device *asd,
atomisp_css_enable_continuous(asd, enable);
atomisp_css_enable_cvf(asd, asd->continuous_viewfinder->val);
if (atomisp_css_continuous_set_num_raw_frames(asd,
asd->continuous_raw_buffer_size->val)) {
dev_err(isp->dev, "css_continuous_set_num_raw_frames failed\n");
return -EINVAL;
}
atomisp_css_continuous_set_num_raw_frames(asd,
asd->continuous_raw_buffer_size->val);
if (!enable) {
atomisp_css_enable_raw_binning(asd, false);
......
......@@ -250,9 +250,9 @@ void atomisp_destroy_pipes_stream_force(struct atomisp_sub_device *asd);
void atomisp_css_stop(struct atomisp_sub_device *asd,
enum ia_css_pipe_id pipe_id, bool in_reset);
int atomisp_css_continuous_set_num_raw_frames(
struct atomisp_sub_device *asd,
int num_frames);
void atomisp_css_continuous_set_num_raw_frames(
struct atomisp_sub_device *asd,
int num_frames);
int atomisp_css_copy_configure_output(struct atomisp_sub_device *asd,
unsigned int stream_index,
......
......@@ -2190,9 +2190,9 @@ void atomisp_css_stop(struct atomisp_sub_device *asd,
memset(&asd->params.css_param, 0, sizeof(asd->params.css_param));
}
int atomisp_css_continuous_set_num_raw_frames(
struct atomisp_sub_device *asd,
int num_frames)
void atomisp_css_continuous_set_num_raw_frames(
struct atomisp_sub_device *asd,
int num_frames)
{
if (asd->enable_raw_buffer_lock->val) {
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
......@@ -2216,7 +2216,6 @@ int atomisp_css_continuous_set_num_raw_frames(
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
.stream_config.target_num_cont_raw_buf = num_frames;
return 0;
}
static enum ia_css_pipe_mode __pipe_id_to_pipe_mode(
......
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