media: atomisp: Remove sw_contex.power_state checks
authorHans de Goede <hdegoede@redhat.com>
Mon, 14 Nov 2022 15:32:41 +0000 (15:32 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 08:23:11 +0000 (08:23 +0000)
commitf1219d9efab15a95c28df85269db72669f6206a5
tree8c68f7dcd88b6da07b4a6b38c3f3747bfe30c8b4
parent586ef0c6917dc5f7937726733a1f8372ce200f7a
media: atomisp: Remove sw_contex.power_state checks

Remove the unnecessary sw_contex.power_state checks:

1. atomisp_freq_scaling() and atomisp_stop_streaming() only run when the
   ISP is powered up through runtime-pm, so the checks are not necessary

2. atomisp_mrfld_pre_power_down() and atomisp_runtime_resume() are only
   called through the driver-core pm handling code which already
   guarantees they are not called when already powered down / up.

3. atomisp_isr() also checks isp->css_initialized which only gets set
   by atomisp_css_init() which runs *after* powering up the ISP and which
   gets cleared by atomisp_css_uninit() *before* powering down the ISP.

So all the checks are unnecessary, remove them as well as the
sw_contex.power_state field itself.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp_internal.h
drivers/staging/media/atomisp/pci/atomisp_ioctl.c
drivers/staging/media/atomisp/pci/atomisp_v4l2.c