File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -1843,21 +1843,15 @@ static int __init amd_pstate_init(void)
1843
1843
cppc_state = CONFIG_X86_AMD_PSTATE_DEFAULT_MODE ;
1844
1844
}
1845
1845
1846
- switch (cppc_state ) {
1847
- case AMD_PSTATE_DISABLE :
1846
+ if (cppc_state == AMD_PSTATE_DISABLE ) {
1848
1847
pr_info ("driver load is disabled, boot with specific mode to enable this\n" );
1849
1848
return - ENODEV ;
1850
- case AMD_PSTATE_PASSIVE :
1851
- case AMD_PSTATE_ACTIVE :
1852
- case AMD_PSTATE_GUIDED :
1853
- ret = amd_pstate_set_driver (cppc_state );
1854
- if (ret )
1855
- return ret ;
1856
- break ;
1857
- default :
1858
- return - EINVAL ;
1859
1849
}
1860
1850
1851
+ ret = amd_pstate_set_driver (cppc_state );
1852
+ if (ret )
1853
+ return ret ;
1854
+
1861
1855
/* capability check */
1862
1856
if (cpu_feature_enabled (X86_FEATURE_CPPC )) {
1863
1857
pr_debug ("AMD CPPC MSR based functionality is supported\n" );
You can’t perform that action at this time.
0 commit comments