提交 c1d7a2c8 编写于 作者: S Sakari Ailus 提交者: Mauro Carvalho Chehab

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: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
上级 52db11f3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册