media: atomisp: Move calling of css_[un]init() to power_on()/_off()
authorHans de Goede <hdegoede@redhat.com>
Mon, 14 Nov 2022 15:55:38 +0000 (15:55 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 08:24:07 +0000 (08:24 +0000)
commit5317baa0a39ec480d6b225cca639b2fb19583515
treed73e4bd254930a116391c4a954d30af4dfd6b88e
parent6736a68fe15640e007a75f873cec86bdf9cc47a6
media: atomisp: Move calling of css_[un]init() to power_on()/_off()

atomisp_css_init() is always called after calling atomisp_power_on()
either directly or through getting a runtime-pm reference.

Likewise atomisp_css_uninit() is always called after calling
atomisp_power_off().

Move the call site of these 2 functions to inside atomisp_power_on() /
atomisp_power_off() to make this more explicit.

Note this makes atomisp_reset() also set isp_fatal_error on
atomisp_power_on() errors, where as before it only did this on
atomisp_css_init() errors. This behavior change is for the better,
since power-on failing is pretty fatal too.

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_fops.c
drivers/staging/media/atomisp/pci/atomisp_v4l2.c