]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
OPP: Remove _get_opp_table_kref()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 24 Apr 2025 08:51:40 +0000 (14:21 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 24 Apr 2025 10:35:33 +0000 (16:05 +0530)
Use dev_pm_opp_get_opp_table_ref() directly instead.

No intentional functional impact.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
drivers/opp/of.c
drivers/opp/opp.h

index 73e9a3b2f29b31b0963e1305719790ad5d72d40c..e63a9b009df1012dbd9d404a91b2d27555944638 100644 (file)
@@ -59,7 +59,7 @@ static struct opp_table *_find_opp_table_unlocked(struct device *dev)
 
        list_for_each_entry(opp_table, &opp_tables, node) {
                if (_find_opp_dev(dev, opp_table)) {
-                       _get_opp_table_kref(opp_table);
+                       dev_pm_opp_get_opp_table_ref(opp_table);
                        return opp_table;
                }
        }
@@ -1688,14 +1688,9 @@ static void _opp_table_kref_release(struct kref *kref)
        kfree(opp_table);
 }
 
-void _get_opp_table_kref(struct opp_table *opp_table)
-{
-       kref_get(&opp_table->kref);
-}
-
 void dev_pm_opp_get_opp_table_ref(struct opp_table *opp_table)
 {
-       _get_opp_table_kref(opp_table);
+       kref_get(&opp_table->kref);
 }
 EXPORT_SYMBOL_GPL(dev_pm_opp_get_opp_table_ref);
 
index a24f76f5fd0172fc3f9603e57e7124d33074725d..87cb6aeb49ed13f1e36097d5972a37a105238476 100644 (file)
@@ -61,7 +61,7 @@ struct opp_table *_managed_opp(struct device *dev, int index)
                         * OPP table contains a "opp-shared" property.
                         */
                        if (opp_table->shared_opp == OPP_TABLE_ACCESS_SHARED) {
-                               _get_opp_table_kref(opp_table);
+                               dev_pm_opp_get_opp_table_ref(opp_table);
                                managed_table = opp_table;
                        }
 
@@ -117,7 +117,7 @@ static struct opp_table *_find_table_of_opp_np(struct device_node *opp_np)
        mutex_lock(&opp_table_lock);
        list_for_each_entry(opp_table, &opp_tables, node) {
                if (opp_table_np == opp_table->np) {
-                       _get_opp_table_kref(opp_table);
+                       dev_pm_opp_get_opp_table_ref(opp_table);
                        mutex_unlock(&opp_table_lock);
                        return opp_table;
                }
@@ -406,7 +406,7 @@ static void lazy_link_required_opp_table(struct opp_table *new_table)
                        }
 
                        required_opp_tables[i] = new_table;
-                       _get_opp_table_kref(new_table);
+                       dev_pm_opp_get_opp_table_ref(new_table);
 
                        /* Link OPPs now */
                        ret = lazy_link_required_opps(opp_table, new_table, i);
index 5c7c81190e41a36c0dfa72beef2a88a8086b284c..9eba63e01a9e7650cf2e49515b70ba73f72210fc 100644 (file)
@@ -251,7 +251,6 @@ struct opp_table {
 
 /* Routines internal to opp core */
 bool _opp_remove_all_static(struct opp_table *opp_table);
-void _get_opp_table_kref(struct opp_table *opp_table);
 int _get_opp_count(struct opp_table *opp_table);
 struct opp_table *_find_opp_table(struct device *dev);
 struct opp_device *_add_opp_dev(const struct device *dev, struct opp_table *opp_table);