Some asics (APUs) don't have this callback so we want to return
success. Avoids spurious error messages on APUs.
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
if (!hwmgr || !hwmgr->pm_en)
return -EINVAL;
- if (hwmgr->hwmgr_func->set_mp1_state == NULL) {
- pr_info_ratelimited("%s was not implemented.\n", __func__);
- return -EINVAL;
- }
+ if (hwmgr->hwmgr_func->set_mp1_state)
+ return hwmgr->hwmgr_func->set_mp1_state(hwmgr, mp1_state);
- return hwmgr->hwmgr_func->set_mp1_state(hwmgr, mp1_state);
+ return 0;
}
static int pp_dpm_switch_power_profile(void *handle,