From: Jordan Crouse Date: Tue, 21 Nov 2017 19:40:52 +0000 (-0700) Subject: drm/msm/adreno: Remove a useless call to dev_pm_opp_get_freq() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=156a537d056aa9057d1e2d94e5a81505580000bd;p=openwrt%2Fstaging%2Fblogic.git drm/msm/adreno: Remove a useless call to dev_pm_opp_get_freq() 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 Signed-off-by: Rob Clark --- diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 5845e43521f7..deda55ee61f9 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -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); }