diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index 388198f24f84..49e09c641b1c 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -784,14 +784,11 @@ MODULE_DEVICE_TABLE(of, adreno_match_table); /* Dynamically build the OPP table for the GPU device */ static void adreno_build_opp_table(struct device *dev, struct kgsl_pwrctrl *pwr) { - struct opp_table *table; int i; - table = dev_pm_opp_get_opp_table(dev); - if (table) { - dev_pm_opp_put_opp_table(table); + /* Skip if the table has already been populated */ + if (dev_pm_opp_get_opp_count(dev) > 0) return; - } /* Add all the supported frequencies into the tree */ for (i = 0; i < pwr->num_pwrlevels; i++)