OSDN Git Service

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)
commit4eec1919c9585d12526dced3de64c1d95c7fc451
tree6d99be9157c7f1dd0c15fb690cf11f1030b81001
parent2f038c97fd7baaf9508cf32998a5f8f1ddc09a5e
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