Commit 113401c6 authored by Kate Hsuan's avatar Kate Hsuan Committed by Mauro Carvalho Chehab

media: atomisp: sh_css: Removed #ifdef ISP2401 to make code generic

Removed #ifdef ISP2401 to allow the destroy function can destroy the
data of both types of ISP.

Link: https://lore.kernel.org/r/20230802095606.1298152-11-hpa@redhat.comSigned-off-by: default avatarKate Hsuan <hpa@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent ad697947
......@@ -8450,7 +8450,7 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
if ((stream->last_pipe) &&
ia_css_pipeline_is_mapped(stream->last_pipe->pipe_num)) {
#if defined(ISP2401)
if (IS_ISP2401) {
for (i = 0; i < stream->num_pipes; i++) {
struct ia_css_pipe *entry = stream->pipes[i];
unsigned int sp_thread_id;
......@@ -8462,6 +8462,7 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
if (!ia_css_pipeline_get_sp_thread_id(
ia_css_pipe_get_pipe_num(entry), &sp_thread_id))
return -EINVAL;
/* get the target input terminal */
sp_pipeline_input_terminal =
&sh_css_sp_group.pipe_io[sp_thread_id].input;
......@@ -8474,6 +8475,7 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
}
}
}
if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
for (i = 0; i < stream->num_pipes; i++) {
struct ia_css_pipe *entry = stream->pipes[i];
......@@ -8489,7 +8491,7 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
}
}
stream_unregister_with_csi_rx(stream);
#endif
}
for (i = 0; i < stream->num_pipes; i++) {
struct ia_css_pipe *curr_pipe = stream->pipes[i];
......
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