Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI / PMIC: remove modular references from non-modular code

The Kconfig currently controlling compilation of these files are:

drivers/acpi/Kconfig:menuconfig PMIC_OPREGION
drivers/acpi/Kconfig: bool "PMIC (Power Management Integrated Circuit) operation region support"

drivers/acpi/Kconfig:config BXT_WC_PMIC_OPREGION
drivers/acpi/Kconfig: bool "ACPI operation region support for BXT WhiskeyCove PMIC"

drivers/acpi/Kconfig:config XPOWER_PMIC_OPREGION
drivers/acpi/Kconfig: bool "ACPI operation region support for XPower AXP288 PMIC"

...meaning they currently are not being built as a module by anyone.

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

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

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

In one case we replace the module.h with export.h since that file
is exporting some symbols, but does not use __init. The other two
are using __init and so module.h gets replaced with init.h there.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Paul Gortmaker and committed by
Rafael J. Wysocki
6d3ef8d8 730de199

+4 -13
+1 -3
drivers/acpi/pmic/intel_pmic.c
··· 13 13 * GNU General Public License for more details. 14 14 */ 15 15 16 - #include <linux/module.h> 16 + #include <linux/export.h> 17 17 #include <linux/acpi.h> 18 18 #include <linux/regmap.h> 19 19 #include <acpi/acpi_lpat.h> ··· 319 319 return ret; 320 320 } 321 321 EXPORT_SYMBOL_GPL(intel_pmic_install_opregion_handler); 322 - 323 - MODULE_LICENSE("GPL");
+1 -5
drivers/acpi/pmic/intel_pmic_bxtwc.c
··· 13 13 * GNU General Public License for more details. 14 14 */ 15 15 16 - #include <linux/module.h> 16 + #include <linux/init.h> 17 17 #include <linux/acpi.h> 18 18 #include <linux/mfd/intel_soc_pmic.h> 19 19 #include <linux/regmap.h> ··· 417 417 { 418 418 return platform_driver_register(&intel_bxtwc_pmic_opregion_driver); 419 419 } 420 - 421 420 device_initcall(intel_bxtwc_pmic_opregion_driver_init); 422 - 423 - MODULE_DESCRIPTION("BXT WhiskeyCove ACPI opregion driver"); 424 - MODULE_LICENSE("GPL");
+2 -5
drivers/acpi/pmic/intel_pmic_xpower.c
··· 13 13 * GNU General Public License for more details. 14 14 */ 15 15 16 - #include <linux/module.h> 16 + #include <linux/init.h> 17 17 #include <linux/acpi.h> 18 18 #include <linux/mfd/axp20x.h> 19 19 #include <linux/regmap.h> ··· 262 262 { 263 263 return platform_driver_register(&intel_xpower_pmic_opregion_driver); 264 264 } 265 - module_init(intel_xpower_pmic_opregion_driver_init); 266 - 267 - MODULE_DESCRIPTION("XPower AXP288 ACPI operation region driver"); 268 - MODULE_LICENSE("GPL"); 265 + device_initcall(intel_xpower_pmic_opregion_driver_init);