drm: Switch to use DEVFREQ_GOV_SIMPLE_ONDEMAND constant
authorYue Hu <huyue2@yulong.com>
Thu, 25 Jul 2019 03:52:39 +0000 (11:52 +0800)
committerRob Herring <robh@kernel.org>
Thu, 25 Jul 2019 22:14:43 +0000 (16:14 -0600)
Since governor name is defined by DEVFREQ framework internally, use the
macro definition instead of using the name directly.

Signed-off-by: Yue Hu <huyue2@yulong.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Jordan Crouse <jcrouse@codeaurora.org> for the msm part.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190725035239.1192-1-zbestahu@gmail.com
drivers/gpu/drm/msm/msm_gpu.c
drivers/gpu/drm/panfrost/panfrost_devfreq.c

index 4edb874548b322be130d8c755a01f3730ea42b42..f7308d68c5edb05a47417131ecc80dd8d685d5a1 100644 (file)
@@ -95,7 +95,8 @@ static void msm_devfreq_init(struct msm_gpu *gpu)
         */
 
        gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev,
-                       &msm_devfreq_profile, "simple_ondemand", NULL);
+                       &msm_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
+                       NULL);
 
        if (IS_ERR(gpu->devfreq.devfreq)) {
                DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize GPU devfreq\n");
index db798532b0b6b0bc4d20011a9ab403bb0a333176..a7c18bceb7fd423329261455ffc75c21df61327c 100644 (file)
@@ -157,7 +157,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
        dev_pm_opp_put(opp);
 
        pfdev->devfreq.devfreq = devm_devfreq_add_device(&pfdev->pdev->dev,
-                       &panfrost_devfreq_profile, "simple_ondemand", NULL);
+                       &panfrost_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
+                       NULL);
        if (IS_ERR(pfdev->devfreq.devfreq)) {
                DRM_DEV_ERROR(&pfdev->pdev->dev, "Couldn't initialize GPU devfreq\n");
                ret = PTR_ERR(pfdev->devfreq.devfreq);