Skip to content

Commit 456ca88

Browse files
Perry Yuanrafaeljw
authored andcommitted
cpufreq: amd-pstate: change amd-pstate driver to be built-in type
Currently when the amd-pstate and acpi_cpufreq are both built into kernel as module driver, amd-pstate will not be loaded by default in this case. Change amd-pstate driver as built-in type, it will resolve the loading sequence problem to allow user to make amd-pstate driver as the default cpufreq scaling driver. Acked-by: Huang Rui <[email protected]> Reviewed-by: Gautham R. Shenoy <[email protected]> Tested-by: Wyes Karny <[email protected]> Signed-off-by: Perry Yuan <[email protected]> Fixes: ec437d7 ("cpufreq: amd-pstate: Introduce a new AMD P-State driver to support future processors") Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 919f455 commit 456ca88

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

drivers/cpufreq/Kconfig.x86

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ config X86_PCC_CPUFREQ
3535
If in doubt, say N.
3636

3737
config X86_AMD_PSTATE
38-
tristate "AMD Processor P-State driver"
38+
bool "AMD Processor P-State driver"
3939
depends on X86 && ACPI
4040
select ACPI_PROCESSOR
4141
select ACPI_CPPC_LIB if X86_64

drivers/cpufreq/amd-pstate.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -663,16 +663,7 @@ static int __init amd_pstate_init(void)
663663

664664
return ret;
665665
}
666-
667-
static void __exit amd_pstate_exit(void)
668-
{
669-
cpufreq_unregister_driver(&amd_pstate_driver);
670-
671-
amd_pstate_enable(false);
672-
}
673-
674-
module_init(amd_pstate_init);
675-
module_exit(amd_pstate_exit);
666+
device_initcall(amd_pstate_init);
676667

677668
MODULE_AUTHOR("Huang Rui <[email protected]>");
678669
MODULE_DESCRIPTION("AMD Processor P-state Frequency Driver");

0 commit comments

Comments
 (0)