From 60adf47e0fafa3ee94041e5e2d33072a56f5effe Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Sat, 2 Dec 2023 16:26:26 +0000 Subject: [PATCH] drm/tegra: Always use devm_pm_runtime_enable The function devm_pm_runtime_enable() has been supported since Linux v5.15 and so always use this function. Bug 3820317 Change-Id: I805f3c681822b4bfc825b671c54a7dea2199f351 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026922 (cherry picked from commit 591949a2f1f09cb00f5ddc38e8e0533a2c92b065) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3029980 Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/gpu/drm/tegra/hdmi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 4cb37b18..f0c3a65f 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -1864,16 +1864,14 @@ static int tegra_hdmi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, hdmi); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) err = devm_pm_runtime_enable(&pdev->dev); if (err) return err; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev); if (err) return err; -#else - pm_runtime_enable(&pdev->dev); #endif INIT_LIST_HEAD(&hdmi->client.list); @@ -1894,10 +1892,6 @@ static int tegra_hdmi_remove(struct platform_device *pdev) { struct tegra_hdmi *hdmi = platform_get_drvdata(pdev); -#if !(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) - pm_runtime_disable(&pdev->dev); -#endif - host1x_client_unregister(&hdmi->client); tegra_output_remove(&hdmi->output);