Skip to contentSkip to conversation

cpufreq: make ti-cpufreq explicitly non-modular

PATCH In review Paul Gortmaker 2 participants 2 messages Feb 14, 2017 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: make ti-cpufreq explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/cpufreq/Kconfig.arm:config ARM_TI_CPUFREQ
drivers/cpufreq/Kconfig.arm: bool "Texas Instruments CPUFreq support"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

Cc Viresh Kumar <[email protected]>
Cc Dave Gerlach <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
---
 drivers/cpufreq/ti-cpufreq.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/cpufreq/ti-cpufreq.c +2 -6
index 7ff7ae3c3911..a7b5658c0460 100644
@@ -17,7 +17,7 @@
 #include <linux/cpu.h>
 #include <linux/io.h>
 #include <linux/mfd/syscon.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/pm_opp.h>
@@ -265,8 +265,4 @@ static int ti_cpufreq_init(void)
 
 	return ret;
 }
-module_init(ti_cpufreq_init);
-
-MODULE_DESCRIPTION("TI CPUFreq/OPP hw-supported driver");
-MODULE_AUTHOR("Dave Gerlach <[email protected]>");
-MODULE_LICENSE("GPL v2");
+device_initcall(ti_cpufreq_init);
Signature · 1 line
2.11.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 39 lines · Paul Gortmaker

The Kconfig currently controlling compilation of this code is:

drivers/cpufreq/Kconfig.arm:config ARM_TI_CPUFREQ
drivers/cpufreq/Kconfig.arm: bool "Texas Instruments CPUFreq support"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

Cc Viresh Kumar <[email protected]>
Cc Dave Gerlach <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
---
 drivers/cpufreq/ti-cpufreq.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/cpufreq/ti-cpufreq.c +1 -1
index 7ff7ae3c3911..a7b5658c0460 100644
@@ -17,7 +17,7 @@
 #include <linux/cpu.h>
 #include <linux/io.h>
 #include <linux/mfd/syscon.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/pm_opp.h>

drivers/cpufreq/ti-cpufreq.c static int ti_cpufreq_init(void) · line 268

Quoted 9 lines
drivers/cpufreq/ti-cpufreq.c +1 -5
@@ -265,8 +265,4 @@ static int ti_cpufreq_init(void)
 
 	return ret;
 }
-module_init(ti_cpufreq_init);
-
-MODULE_DESCRIPTION("TI CPUFreq/OPP hw-supported driver");
-MODULE_AUTHOR("Dave Gerlach <[email protected]>");
-MODULE_LICENSE("GPL v2");
+device_initcall(ti_cpufreq_init);
Signature · 1 line
viresh