Skip to content

Commit 02fd86b

Browse files
pcercueirafaeljw
authored andcommitted
mmc: jz4740: Use pm_ptr() macro
Use the newly introduced pm_ptr() macro to simplify the code. Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 756a64c commit 02fd86b

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

drivers/mmc/host/jz4740_mmc.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,32 +1108,26 @@ static int jz4740_mmc_remove(struct platform_device *pdev)
11081108
return 0;
11091109
}
11101110

1111-
#ifdef CONFIG_PM_SLEEP
1112-
1113-
static int jz4740_mmc_suspend(struct device *dev)
1111+
static int __maybe_unused jz4740_mmc_suspend(struct device *dev)
11141112
{
11151113
return pinctrl_pm_select_sleep_state(dev);
11161114
}
11171115

1118-
static int jz4740_mmc_resume(struct device *dev)
1116+
static int __maybe_unused jz4740_mmc_resume(struct device *dev)
11191117
{
11201118
return pinctrl_select_default_state(dev);
11211119
}
11221120

11231121
static SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend,
11241122
jz4740_mmc_resume);
1125-
#define JZ4740_MMC_PM_OPS (&jz4740_mmc_pm_ops)
1126-
#else
1127-
#define JZ4740_MMC_PM_OPS NULL
1128-
#endif
11291123

11301124
static struct platform_driver jz4740_mmc_driver = {
11311125
.probe = jz4740_mmc_probe,
11321126
.remove = jz4740_mmc_remove,
11331127
.driver = {
11341128
.name = "jz4740-mmc",
11351129
.of_match_table = of_match_ptr(jz4740_mmc_of_match),
1136-
.pm = JZ4740_MMC_PM_OPS,
1130+
.pm = pm_ptr(&jz4740_mmc_pm_ops),
11371131
},
11381132
};
11391133

0 commit comments

Comments
 (0)