Commit a0a9e7b4 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/tidss: Use pm_runtime_resume_and_get()

Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync(), which
will handle error situations better. Also fix the return, as there
should be no reason for the current complex return.
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarAradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-1-ac91b5ea35c0@ideasonboard.comSigned-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
parent 5cc5ea7b
......@@ -32,9 +32,9 @@ int tidss_runtime_get(struct tidss_device *tidss)
dev_dbg(tidss->dev, "%s\n", __func__);
r = pm_runtime_get_sync(tidss->dev);
r = pm_runtime_resume_and_get(tidss->dev);
WARN_ON(r < 0);
return r < 0 ? r : 0;
return r;
}
void tidss_runtime_put(struct tidss_device *tidss)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment