[PATCH v2 05/12] mtd: maps: pxa2xx: Remove #ifdef guards around shutdown callback

From: Paul Cercueil

Date: Tue Nov 17 2026 - 04:38:39 EST


pxa2xx_flash_shutdown() calls mtd_suspend() and mtd_resume().

Unlike what their names suggest, those two functions aren't related to
CONFIG_PM, and neither is the platform_driver.shutdown() callback.

Signed-off-by: Paul Cercueil <paul.cercueil@xxxxxxxxxxx>
---

v2: Don't use pm_ptr(), and rewrite commit message
---
drivers/mtd/maps/pxa2xx-flash.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index bc303a9909d4..5846e09cea37 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -111,7 +111,6 @@ static void pxa2xx_flash_remove(struct platform_device *dev)
kfree(info);
}

-#ifdef CONFIG_PM
static void pxa2xx_flash_shutdown(struct platform_device *dev)
{
struct pxa2xx_flash_info *info = platform_get_drvdata(dev);
@@ -119,9 +118,6 @@ static void pxa2xx_flash_shutdown(struct platform_device *dev)
if (info && mtd_suspend(info->mtd) == 0)
mtd_resume(info->mtd);
}
-#else
-#define pxa2xx_flash_shutdown NULL
-#endif

static struct platform_driver pxa2xx_flash_driver = {
.driver = {
--
2.47.3