diff mbox series

drm/bridge: anx7625: Use devm_pm_runtime_enable()

Message ID 20250409093814.3977025-1-wenst@chromium.org (mailing list archive)
State New, archived
Headers show
Series drm/bridge: anx7625: Use devm_pm_runtime_enable() | expand

Commit Message

Chen-Yu Tsai April 9, 2025, 9:38 a.m. UTC
The anx7625 driver is open coding what devm_pm_runtime_enable() does.

Switch to the common helper instead.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Dmitry Baryshkov April 10, 2025, 9:30 a.m. UTC | #1
On Wed, Apr 09, 2025 at 05:38:13PM +0800, Chen-Yu Tsai wrote:
> The anx7625 driver is open coding what devm_pm_runtime_enable() does.
> 
> Switch to the common helper instead.
> 
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
>  drivers/gpu/drm/bridge/analogix/anx7625.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 866806e908cd..8bfe477c476c 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -2569,12 +2569,6 @@  static const struct dev_pm_ops anx7625_pm_ops = {
 			   anx7625_runtime_pm_resume, NULL)
 };
 
-static void anx7625_runtime_disable(void *data)
-{
-	pm_runtime_dont_use_autosuspend(data);
-	pm_runtime_disable(data);
-}
-
 static int anx7625_link_bridge(struct drm_dp_aux *aux)
 {
 	struct anx7625_data *platform = container_of(aux, struct anx7625_data, aux);
@@ -2708,11 +2702,10 @@  static int anx7625_i2c_probe(struct i2c_client *client)
 		goto free_wq;
 	}
 
-	pm_runtime_enable(dev);
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
 	pm_suspend_ignore_children(dev, true);
-	ret = devm_add_action_or_reset(dev, anx7625_runtime_disable, dev);
+	ret = devm_pm_runtime_enable(dev);
 	if (ret)
 		goto free_wq;