]> git.baikalelectronics.ru Git - kernel.git/commit
media: imx: imx-mipi-csis: Drop powered flag
authorJacopo Mondi <jacopo@jmondi.org>
Mon, 14 Mar 2022 10:39:38 +0000 (10:39 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 24 Apr 2022 08:06:22 +0000 (09:06 +0100)
commitc66814a24ad6a528b2511484fa0721532eb45fd4
treeb6173f8b671f3377b49d2808c3f5c713f51c5bf0
parenta544bca16de99e5e56e9fc9e68a845e8e9bac06e
media: imx: imx-mipi-csis: Drop powered flag

The mipi_csis_device.powered flag only serves for the purpose of
not accessing registers in mipi_csis_log_status() when the interface
is not powered up.

Instead of manually tracking the power state, rely on
pm_runtime_get_if_in_use() to remove the 'powered' flag. Also remove
the locking in the function as runtime_pm() is refcounted and there's no
risk of the interface being powered down behind our backs.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/nxp/imx-mipi-csis.c