drm/msm/adreno: Remove a useless call to dev_pm_opp_get_freq()
authorJordan Crouse <jcrouse@codeaurora.org>
Tue, 21 Nov 2017 19:40:52 +0000 (12:40 -0700)
committerRob Clark <robdclark@gmail.com>
Wed, 10 Jan 2018 13:58:41 +0000 (08:58 -0500)
Calling dev_pm_opp_find_freq_floor() returns the matched frequency
in 'freq'.  We don't need to call dev_pm_opp_get_freq() again
to get the frequency value.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/adreno/adreno_device.c

index 5845e43521f7fa1e15d4e0fcc4e372fc547a1cf4..deda55ee61f94374291d354546f599e280cda629 100644 (file)
@@ -248,7 +248,7 @@ static int adreno_get_pwrlevels(struct device *dev,
        /* Find the fastest defined rate */
        opp = dev_pm_opp_find_freq_floor(dev, &freq);
        if (!IS_ERR(opp)) {
-               config->fast_rate = dev_pm_opp_get_freq(opp);
+               config->fast_rate = freq;
                dev_pm_opp_put(opp);
        }