diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-05-11 16:14:21 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-06-09 14:45:04 +0100 |
commit | b19f8ef5bd3957e6269f1cb9647054de2e1bf217 (patch) | |
tree | 83a18a03bb79a57538c1337be7fcb636ded1bf0e /drivers/staging | |
parent | 0f072c1e2453e6c56b233b15a2f5d50606f02d85 (diff) | |
download | linux-stable-b19f8ef5bd3957e6269f1cb9647054de2e1bf217.tar.gz linux-stable-b19f8ef5bd3957e6269f1cb9647054de2e1bf217.tar.bz2 linux-stable-b19f8ef5bd3957e6269f1cb9647054de2e1bf217.zip |
media: atomisp: Remove no longer used atomisp_css_flush()
Remove the no longer used atomisp_css_flush() function and merge
atomisp_assert_recovery_work() and __atomisp_css_recover() into
a single function.
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_cmd.c | 25 | ||||
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_cmd.h | 2 |
2 files changed, 6 insertions, 21 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 26a194251a76..1482184a9ea5 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -935,18 +935,20 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error, atomisp_qbuffers_to_css(asd); } -static void __atomisp_css_recover(struct atomisp_device *isp) +void atomisp_assert_recovery_work(struct work_struct *work) { + struct atomisp_device *isp = container_of(work, struct atomisp_device, + assert_recovery_work); struct pci_dev *pdev = to_pci_dev(isp->dev); enum ia_css_pipe_id css_pipe_id; bool stream_restart = false; unsigned long flags; int ret; - lockdep_assert_held(&isp->mutex); + mutex_lock(&isp->mutex); if (!atomisp_streaming_count(isp)) - return; + goto out_unlock; atomisp_css_irq_enable(isp, IA_CSS_IRQ_INFO_CSS_RECEIVER_SOF, false); @@ -1028,26 +1030,11 @@ static void __atomisp_css_recover(struct atomisp_device *isp) dev_warn(isp->dev, "can't start streaming on sensor!\n"); } -} -void atomisp_assert_recovery_work(struct work_struct *work) -{ - struct atomisp_device *isp = container_of(work, struct atomisp_device, - assert_recovery_work); - - mutex_lock(&isp->mutex); - __atomisp_css_recover(isp); +out_unlock: mutex_unlock(&isp->mutex); } -void atomisp_css_flush(struct atomisp_device *isp) -{ - /* Start recover */ - __atomisp_css_recover(isp); - - dev_dbg(isp->dev, "atomisp css flush done\n"); -} - void atomisp_setup_flash(struct atomisp_sub_device *asd) { struct atomisp_device *isp = asd->isp; diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.h b/drivers/staging/media/atomisp/pci/atomisp_cmd.h index 1cb973ddf2dc..783fb1e6f4f9 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.h +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.h @@ -282,8 +282,6 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error, enum ia_css_pipe_id css_pipe_id, bool q_buffers, enum atomisp_input_stream_id stream_id); -void atomisp_css_flush(struct atomisp_device *isp); - /* Events. Only one event has to be exported for now. */ void atomisp_eof_event(struct atomisp_sub_device *asd, uint8_t exp_id); |