smiapp: Use pm_runtime_get_if_active
PATCH 1/1 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 <[email protected]>
--- drivers/media/i2c/smiapp/smiapp-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/i2c/smiapp/smiapp-core.c +1 -3
@@ -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 ;
Signature · 1 line
2.20.1