drm/vc4: dsi: Switch to devm_pm_runtime_enable
devm_pm_runtime_enable() simplifies the driver a bit since it will call pm_runtime_disable() automatically through a device-managed action. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220711173939.1132294-37-maxime@cerno.tech
This commit is contained in:
parent
6eda156429
commit
7b44e4de72
1 changed files with 4 additions and 4 deletions
|
|
@ -1729,6 +1729,10 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data)
|
|||
|
||||
drm_encoder_helper_add(encoder, &vc4_dsi_encoder_helper_funcs);
|
||||
|
||||
ret = devm_pm_runtime_enable(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = drm_bridge_attach(encoder, dsi->bridge, NULL, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
@ -1741,8 +1745,6 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data)
|
|||
|
||||
vc4_debugfs_add_regset32(drm, dsi->variant->debugfs_name, &dsi->regset);
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1752,8 +1754,6 @@ static void vc4_dsi_unbind(struct device *dev, struct device *master,
|
|||
struct vc4_dsi *dsi = dev_get_drvdata(dev);
|
||||
struct drm_encoder *encoder = &dsi->encoder.base;
|
||||
|
||||
pm_runtime_disable(dev);
|
||||
|
||||
/*
|
||||
* Restore the bridge_chain so the bridge detach procedure can happen
|
||||
* normally.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue