]> git.baikalelectronics.ru Git - kernel.git/commit
media: ov5647: Apply controls only when powered
authorJacopo Mondi <jacopo@jmondi.org>
Thu, 19 Nov 2020 16:35:47 +0000 (17:35 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 12 Jan 2021 16:01:48 +0000 (17:01 +0100)
commit1f82030600041a189310a7ca27e2df657a5bedd9
tree6d99be9157c7f1dd0c15fb690cf11f1030b81001
parent4746688531c0b5481264de53c9d04f67545631cd
media: ov5647: Apply controls only when powered

Use pm_runtime_get_if_in_use() in s_ctrl to apply controls
only when the device is powered on.

Rework the control set function to balance the
pm_runtime_get_if_in_use() call with
pm_runtime_put() at the end of the function.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov5647.c