[PATCH V7 16/16] DO-NOT_MERGE: cpufreq: Rename cpufreq-dt platdev
From: Viresh Kumar
Date: Mon Jan 13 2025 - 06:30:03 EST
The module! implementation in the Rust code expects a module name
without a '-' symbol, else it fails to compile with following errors:
error: expected one of `:`, `;`, or `=`, found `-`
--> drivers/cpufreq/rcpufreq_dt.rs:247:1
|
247 | / module_platform_driver! {
248 | | type: CPUFreqDTDriver,
249 | | name: "cpufreq-dt",
250 | | author: "Viresh Kumar <viresh.kumar@xxxxxxxxxx>",
251 | | description: "Generic CPUFreq DT driver",
252 | | license: "GPL v2",
253 | | }
| |_^ expected one of `:`, `;`, or `=`
|
= note: this error originates in the macro `$crate::prelude::module` which comes from the expansion of the macro `module_platform_driver` (in Nightly builds, run with -Z macro-backtrace for more info)
This must be fixed properly in the Rust code instead. Not to be merged.
Not-Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
---
drivers/cpufreq/cpufreq-dt-platdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 9c198bd4f7e9..263e1e97538d 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -230,7 +230,7 @@ static int __init cpufreq_dt_platdev_init(void)
return -ENODEV;
create_pdev:
- return PTR_ERR_OR_ZERO(platform_device_register_data(NULL, "cpufreq-dt",
+ return PTR_ERR_OR_ZERO(platform_device_register_data(NULL, "cpufreq_dt",
-1, data,
sizeof(struct cpufreq_dt_platform_data)));
}
--
2.31.1.272.g89b43f80a514