aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-06-15 21:50:35 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-07-08 16:38:13 +0100
commit1341bc9e99af58e5a0c0597da562658332df4513 (patch)
tree75fd04300b975e6f632a8cf614813dbacbb9e6a1
parentmedia: atomisp: use atomisp_css_update_stream() in more places (diff)
media: atomisp: use atomisp_destroy_pipes_stream_force() in more places
Use atomisp_destroy_pipes_stream_force() in 4 more places, instead of open coding it. Link: https://lore.kernel.org/linux-media/20220615205037.16549-39-hdegoede@redhat.com Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp_compat_css20.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
index 889ada3e5923..cc8bc3fd1f10 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
@@ -810,14 +810,7 @@ int atomisp_create_pipes_stream(struct atomisp_sub_device *asd)
int atomisp_css_update_stream(struct atomisp_sub_device *asd)
{
- struct atomisp_device *isp = asd->isp;
-
- if (__destroy_streams(asd, true))
- dev_warn(isp->dev, "destroy stream failed.\n");
-
- if (__destroy_pipes(asd, true))
- dev_warn(isp->dev, "destroy pipe failed.\n");
-
+ atomisp_destroy_pipes_stream_force(asd);
return atomisp_create_pipes_stream(asd);
}
@@ -1166,8 +1159,7 @@ int atomisp_css_start(struct atomisp_sub_device *asd,
return 0;
start_err:
- __destroy_streams(asd, true);
- __destroy_pipes(asd, true);
+ atomisp_destroy_pipes_stream_force(asd);
/* css 2.0 API limitation: ia_css_stop_sp() could be only called after
* destroy all pipes
@@ -2072,13 +2064,8 @@ void atomisp_css_stop(struct atomisp_sub_device *asd,
unsigned long irqflags;
unsigned int i;
- /* if is called in atomisp_reset(), force destroy stream */
- if (__destroy_streams(asd, true))
- dev_err(isp->dev, "destroy stream failed.\n");
-
- /* if is called in atomisp_reset(), force destroy all pipes */
- if (__destroy_pipes(asd, true))
- dev_err(isp->dev, "destroy pipes failed.\n");
+ /* if is called in atomisp_reset(), force destroy streams and pipes */
+ atomisp_destroy_pipes_stream_force(asd);
atomisp_init_raw_buffer_bitmap(asd);
@@ -2658,8 +2645,7 @@ static int __get_frame_info(struct atomisp_sub_device *asd,
return 0;
get_info_err:
- __destroy_streams(asd, true);
- __destroy_pipes(asd, true);
+ atomisp_destroy_pipes_stream_force(asd);
return -EINVAL;
}