Skip to content

Commit 26d3474

Browse files
committed
drm/bridge: ti-sn65dsi86: Properly undo autosuspend
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: 9bede63 ("drm/bridge: ti-sn65dsi86: Use pm_runtime autosuspend") Signed-off-by: Douglas Anderson <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20220222141838.1.If784ba19e875e8ded4ec4931601ce6d255845245@changeid
1 parent ecbd491 commit 26d3474

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,6 +1802,7 @@ static inline void ti_sn_gpio_unregister(void) {}
18021802

18031803
static void ti_sn65dsi86_runtime_disable(void *data)
18041804
{
1805+
pm_runtime_dont_use_autosuspend(data);
18051806
pm_runtime_disable(data);
18061807
}
18071808

@@ -1861,11 +1862,11 @@ static int ti_sn65dsi86_probe(struct i2c_client *client,
18611862
"failed to get reference clock\n");
18621863

18631864
pm_runtime_enable(dev);
1865+
pm_runtime_set_autosuspend_delay(pdata->dev, 500);
1866+
pm_runtime_use_autosuspend(pdata->dev);
18641867
ret = devm_add_action_or_reset(dev, ti_sn65dsi86_runtime_disable, dev);
18651868
if (ret)
18661869
return ret;
1867-
pm_runtime_set_autosuspend_delay(pdata->dev, 500);
1868-
pm_runtime_use_autosuspend(pdata->dev);
18691870

18701871
ti_sn65dsi86_debugfs_init(pdata);
18711872

0 commit comments

Comments
 (0)