Skip to content

Commit f1f010c

Browse files
akemnadevireshk
authored andcommitted
cpufreq: fix using cpufreq-dt as module
This driver can be built as a module since commit 3b062a0 ("cpufreq: dt-platdev: Support building as module"), but unfortunately this caused a regression because the cputfreq-dt-platdev.ko module does not autoload. Usually, this is solved by just using the MODULE_DEVICE_TABLE() macro to export all the device IDs as module aliases. But this driver is special due how matches with devices and decides what platform supports. There are two of_device_id lists, an allow list that are for CPU devices that always match and a deny list that's for devices that must not match. The driver registers a cpufreq-dt platform device for all the CPU device nodes that either are in the allow list or contain an operating-points-v2 property and are not in the deny list. Enforce builtin compile of cpufreq-dt-platdev to make autoload work. Fixes: 3b062a0 ("cpufreq: dt-platdev: Support building as module") Link: https://lore.kernel.org/all/20241104201424.2a42efdd@akair/ Link: https://lore.kernel.org/all/20241119111918.1732531-1-javierm@redhat.com/ Cc: stable@vger.kernel.org Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reported-by: Radu Rendec <rrendec@redhat.com> Reported-by: Javier Martinez Canillas <javierm@redhat.com> [ Viresh: Picked commit log from Javier, updated tags ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 34059ed commit f1f010c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

drivers/cpufreq/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ config CPUFREQ_VIRT
232232
If in doubt, say N.
233233

234234
config CPUFREQ_DT_PLATDEV
235-
tristate "Generic DT based cpufreq platdev driver"
235+
bool "Generic DT based cpufreq platdev driver"
236236
depends on OF
237237
help
238238
This adds a generic DT based cpufreq platdev driver for frequency

drivers/cpufreq/cpufreq-dt-platdev.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,5 +235,3 @@ static int __init cpufreq_dt_platdev_init(void)
235235
sizeof(struct cpufreq_dt_platform_data)));
236236
}
237237
core_initcall(cpufreq_dt_platdev_init);
238-
MODULE_DESCRIPTION("Generic DT based cpufreq platdev driver");
239-
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)