hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/cpufreq/omap-cpufreq.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * CPU frequency scaling for OMAP using OPP information
34 *
....@@ -8,10 +9,6 @@
89 *
910 * Copyright (C) 2007-2011 Texas Instruments, Inc.
1011 * - OMAP3/4 support by Rajendra Nayak, Santosh Shilimkar
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License version 2 as
14
- * published by the Free Software Foundation.
1512 */
1613
1714 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -125,21 +122,18 @@
125122 dev_err(mpu_dev,
126123 "%s: cpu%d: failed creating freq table[%d]\n",
127124 __func__, policy->cpu, result);
128
- goto fail;
125
+ clk_put(policy->clk);
126
+ return result;
129127 }
130128 }
131129
132130 atomic_inc_return(&freq_table_users);
133131
134132 /* FIXME: what's the actual transition time? */
135
- result = cpufreq_generic_init(policy, freq_table, 300 * 1000);
136
- if (!result)
137
- return 0;
133
+ cpufreq_generic_init(policy, freq_table, 300 * 1000);
134
+ dev_pm_opp_of_register_em(mpu_dev, policy->cpus);
138135
139
- freq_table_free();
140
-fail:
141
- clk_put(policy->clk);
142
- return result;
136
+ return 0;
143137 }
144138
145139 static int omap_cpu_exit(struct cpufreq_policy *policy)