mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
drm/bridge: ti-sn65dsi86: Properly undo autosuspend
[ Upstream commit26d3474348
] The PM Runtime docs say: Drivers in ->remove() callback should undo the runtime PM changes done in ->probe(). Usually this means calling pm_runtime_disable(), pm_runtime_dont_use_autosuspend() etc. We weren't doing that for autosuspend. Let's do it. Fixes:9bede63127
("drm/bridge: ti-sn65dsi86: Use pm_runtime autosuspend") Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220222141838.1.If784ba19e875e8ded4ec4931601ce6d255845245@changeid Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d675c05b79
commit
9dfe6abc6c
@ -1473,6 +1473,7 @@ static inline void ti_sn_gpio_unregister(void) {}
|
||||
|
||||
static void ti_sn65dsi86_runtime_disable(void *data)
|
||||
{
|
||||
pm_runtime_dont_use_autosuspend(data);
|
||||
pm_runtime_disable(data);
|
||||
}
|
||||
|
||||
@ -1532,11 +1533,11 @@ static int ti_sn65dsi86_probe(struct i2c_client *client,
|
||||
"failed to get reference clock\n");
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
pm_runtime_set_autosuspend_delay(pdata->dev, 500);
|
||||
pm_runtime_use_autosuspend(pdata->dev);
|
||||
ret = devm_add_action_or_reset(dev, ti_sn65dsi86_runtime_disable, dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
pm_runtime_set_autosuspend_delay(pdata->dev, 500);
|
||||
pm_runtime_use_autosuspend(pdata->dev);
|
||||
|
||||
ti_sn65dsi86_debugfs_init(pdata);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user