Message ID | 1431287385-1526-5-git-send-email-paul.gortmaker@windriver.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10-05-15, 15:49, Paul Gortmaker wrote: > These files depend on Kconfig options all of which are a bool, so > we use the appropriate registration function, which avoids us > relying on an implicit inclusion of <module.h> which we are > doing currently. > > While this currently works, we really don't want to be including > the module.h header in non-modular code, which we'd be forced > to do, pending some upcoming code relocation from init.h into > module.h. So we fix it now by using the non-modular equivalent. > > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> > Cc: Viresh Kumar <viresh.kumar@linaro.org> > Cc: Kukjin Kim <kgene@kernel.org> > Cc: linux-pm@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > --- > drivers/cpufreq/exynos-cpufreq.c | 2 +- Exynos can be compiled as a module: drivers/cpufreq/Kconfig.arm: config ARM_EXYNOS_CPUFREQ tristate "SAMSUNG EXYNOS CPUfreq Driver" depends on CPU_EXYNOS4210 || SOC_EXYNOS4212 || SOC_EXYNOS4412 || SOC_EXYNOS5250 -- viresh
On Tue, May 12, 2015 at 3:04 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > On 10-05-15, 15:49, Paul Gortmaker wrote: >> These files depend on Kconfig options all of which are a bool, so >> we use the appropriate registration function, which avoids us >> relying on an implicit inclusion of <module.h> which we are >> doing currently. >> >> While this currently works, we really don't want to be including >> the module.h header in non-modular code, which we'd be forced >> to do, pending some upcoming code relocation from init.h into >> module.h. So we fix it now by using the non-modular equivalent. >> >> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> >> Cc: Viresh Kumar <viresh.kumar@linaro.org> >> Cc: Kukjin Kim <kgene@kernel.org> >> Cc: linux-pm@vger.kernel.org >> Cc: linux-arm-kernel@lists.infradead.org >> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> >> --- >> drivers/cpufreq/exynos-cpufreq.c | 2 +- > > Exynos can be compiled as a module: > > drivers/cpufreq/Kconfig.arm: > > config ARM_EXYNOS_CPUFREQ > tristate "SAMSUNG EXYNOS CPUfreq Driver" > depends on CPU_EXYNOS4210 || SOC_EXYNOS4212 || SOC_EXYNOS4412 || SOC_EXYNOS5250 Sounds like things have changed since I did the original compile testing ; thanks for the heads-up and I will follow up with the details, once I can re-test. Thanks, Paul. -- > > -- > viresh > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/
[Re: [PATCH 4/7] drivers/cpufreq: Convert non-modular drivers to use builtin_driver_register] On 12/05/2015 (Tue 12:34) Viresh Kumar wrote: > On 10-05-15, 15:49, Paul Gortmaker wrote: > > These files depend on Kconfig options all of which are a bool, so > > we use the appropriate registration function, which avoids us > > relying on an implicit inclusion of <module.h> which we are > > doing currently. > > > > While this currently works, we really don't want to be including > > the module.h header in non-modular code, which we'd be forced > > to do, pending some upcoming code relocation from init.h into > > module.h. So we fix it now by using the non-modular equivalent. > > > > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> > > Cc: Viresh Kumar <viresh.kumar@linaro.org> > > Cc: Kukjin Kim <kgene@kernel.org> > > Cc: linux-pm@vger.kernel.org > > Cc: linux-arm-kernel@lists.infradead.org > > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> > > --- > > drivers/cpufreq/exynos-cpufreq.c | 2 +- > > Exynos can be compiled as a module: > > drivers/cpufreq/Kconfig.arm: > > config ARM_EXYNOS_CPUFREQ > tristate "SAMSUNG EXYNOS CPUfreq Driver" > depends on CPU_EXYNOS4210 || SOC_EXYNOS4212 || SOC_EXYNOS4412 || SOC_EXYNOS5250 Thanks -- I think I managed to confuse myself into thinking it was builtin always, courtesy of the "-y" in this Makefile line... arm-exynos-cpufreq-y := exynos-cpufreq.o I'll drop the exynos chunk from this patch and fix the implicit module.h exynos usage in a new follow on patch, both to be sent shortly. Paul. -- > > -- > viresh
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 82d2fbb20f7e..2c2a19f035ee 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -236,4 +236,4 @@ static struct platform_driver exynos_cpufreq_platdrv = { }, .probe = exynos_cpufreq_probe, }; -module_platform_driver(exynos_cpufreq_platdrv); +builtin_platform_driver(exynos_cpufreq_platdrv); diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c index b0dac7d6ba31..9e231f52150c 100644 --- a/drivers/cpufreq/s5pv210-cpufreq.c +++ b/drivers/cpufreq/s5pv210-cpufreq.c @@ -659,4 +659,4 @@ static struct platform_driver s5pv210_cpufreq_platdrv = { }, .probe = s5pv210_cpufreq_probe, }; -module_platform_driver(s5pv210_cpufreq_platdrv); +builtin_platform_driver(s5pv210_cpufreq_platdrv);
These files depend on Kconfig options all of which are a bool, so we use the appropriate registration function, which avoids us relying on an implicit inclusion of <module.h> which we are doing currently. While this currently works, we really don't want to be including the module.h header in non-modular code, which we'd be forced to do, pending some upcoming code relocation from init.h into module.h. So we fix it now by using the non-modular equivalent. Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Kukjin Kim <kgene@kernel.org> Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- drivers/cpufreq/exynos-cpufreq.c | 2 +- drivers/cpufreq/s5pv210-cpufreq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)