staging: media: atomisp: use pm_runtime_resume_and_get()
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 23 Apr 2021 15:19:21 +0000 (17:19 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 19 May 2021 07:51:42 +0000 (09:51 +0200)
commitdeb9119f807abd01d4d78a2dc567b10e2501ec79
tree3105d6c427ab03e2552d1bdf231339c8a125934c
parent75ecb9c83cf9d29eaa05bbdd0f84356ac22ed972
staging: media: atomisp: use pm_runtime_resume_and_get()

Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
added pm_runtime_resume_and_get() in order to automatically handle
dev->power.usage_count decrement on errors.

Use the new API, in order to cleanup the error check logic.

Besides that, the de-init order in case of css error was wrong.
This change should also fix that.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_fops.c