diff mbox series

drm/aspeed: use devm_clk_get_enabled() helpers

Message ID 20240823101732.2180381-1-guochunhai@vivo.com (mailing list archive)
State New, archived
Headers show
Series drm/aspeed: use devm_clk_get_enabled() helpers | expand

Commit Message

Chunhai Guo Aug. 23, 2024, 10:17 a.m. UTC
Simplify the code by replacing devm_clk_get() and clk_prepare_enable()
with devm_clk_get_enabled().

Signed-off-by: Chunhai Guo <guochunhai@vivo.com>
---
 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
index a7a6b70220eb..7f4ef85a12a9 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
@@ -191,13 +191,12 @@  static int aspeed_gfx_load(struct drm_device *drm)
 	}
 	reset_control_deassert(priv->rst);
 
-	priv->clk = devm_clk_get(drm->dev, NULL);
+	priv->clk = devm_clk_get_enabled(drm->dev, NULL);
 	if (IS_ERR(priv->clk)) {
 		dev_err(&pdev->dev,
 			"missing or invalid clk device tree entry");
 		return PTR_ERR(priv->clk);
 	}
-	clk_prepare_enable(priv->clk);
 
 	/* Sanitize control registers */
 	writel(0, priv->base + CRT_CTRL1);