mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
char: tpm: Use SIMPLE_DEV_PM_OPS for ibmvtpm power management
Replace the manually defined dev_pm_ops structure with the SIMPLE_DEV_PM_OPS macro to simplify the power management code. This macro automatically handles CONFIG_PM_SLEEP configuration, generating the same suspend/resume callbacks while reducing boilerplate code.Add the value of 'thaw,freeze,poweroff,restore'. Signed-off-by: Li Jun <lijun01@kylinos.cn> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/r/20260819083547.2703228-1-lijun01@kylinos.cn Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
This commit is contained in:
parent
95ae1ad345
commit
fc0ddb3174
|
|
@ -462,10 +462,7 @@ static const struct tpm_class_ops tpm_ibmvtpm = {
|
|||
.req_canceled = tpm_ibmvtpm_req_canceled,
|
||||
};
|
||||
|
||||
static const struct dev_pm_ops tpm_ibmvtpm_pm_ops = {
|
||||
.suspend = tpm_ibmvtpm_suspend,
|
||||
.resume = tpm_ibmvtpm_resume,
|
||||
};
|
||||
static SIMPLE_DEV_PM_OPS(tpm_ibmvtpm_pm_ops, tpm_ibmvtpm_suspend, tpm_ibmvtpm_resume);
|
||||
|
||||
/**
|
||||
* ibmvtpm_crq_get_next - Get next responded crq
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user