Re: [PATCH] tpm: fix build regression for tpm_tis_resume
From: Breno Leitao
Date: Wed Sep 16 2026 - 05:25:18 EST
On Tue, Sep 15, 2026 at 10:12:29PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Using DEFINE_SIMPLE_DEV_PM_OPS means that there is no a code reference
> to the unused tpm_tis_resume, but that fails here since the declaration
> is hidden:
>
> drivers/char/tpm/tpm_tis_i2c.c:322:61: error: 'tpm_tis_resume' undeclared here (not in a function); did you mean 'tpm_tis_remove'?
> 322 | static DEFINE_SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume);
> | ^~~~~~~~~~~~~~
>
> Remove the incorrect #ifdef.
>
> Fixes: 2249200ee420 ("tpm: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr()")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Tested-by: Breno Leitao <leitao@xxxxxxxxxx>