diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2019-10-16 13:19:30 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-06-23 15:14:06 +0200 |
commit | c1d7a2c8259c0a65189542d3e5d7a80f9ea012b6 (patch) | |
tree | e5171683c5697dd7a9893a7a5612ac55d6be9fa3 /drivers/media | |
parent | 52db11f38333f90dcdc9a12a09f9ec990516025d (diff) |
media: smiapp: Use pm_runtime_get_if_active
Use the convenience function pm_runtime_get_if_active() instead of a
number of calls to runtime PM to figure out if the device was already
powered up.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 0a8d27481bd1..8a9c7de0c056 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -508,9 +508,7 @@ static int smiapp_set_ctrl(struct v4l2_ctrl *ctrl) break; } - pm_runtime_get_noresume(&client->dev); - pm_status = pm_runtime_get_if_in_use(&client->dev); - pm_runtime_put_noidle(&client->dev); + pm_status = pm_runtime_get_if_active(&client->dev, true); if (!pm_status) return 0; |