]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mmc: sdhci-esdhc-imx: use pm_runtime_resume_and_get() in suspend
authorLuke Wang <ziniu.wang_1@nxp.com>
Wed, 15 Jul 2026 07:18:16 +0000 (15:18 +0800)
committerUlf Hansson <ulfh@kernel.org>
Wed, 15 Jul 2026 08:59:50 +0000 (10:59 +0200)
commit8da5930144712412d85e7f868693d96ec5c2018c
tree26a815282ea44f836a4381b956fdb8d42078f026
parent9d87eaf985cef9581b6ed99b461b38e8cd666480
mmc: sdhci-esdhc-imx: use pm_runtime_resume_and_get() in suspend

Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() to
simplify error handling. pm_runtime_resume_and_get() automatically
drops the usage counter on failure, avoiding the need for a separate
pm_runtime_put_noidle() call. If it fails, the device is unclocked and
accessing hardware registers would cause a kernel panic, so return the
error immediately.

Fixes: 676a83855614 ("mmc: host: sdhci-esdhc-imx: refactor the system PM logic")
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
drivers/mmc/host/sdhci-esdhc-imx.c