Skip to content

Commit e0d64ec

Browse files
pcercueirafaeljw
authored andcommitted
mmc: jz4740: Use the new PM macros
- Use DEFINE_SIMPLE_DEV_PM_OPS() instead of the SIMPLE_DEV_PM_OPS() macro. This makes it possible to remove the __maybe_unused flags on the callback functions. - Since we only have callbacks for suspend/resume, we can conditionally compile the dev_pm_ops structure for when CONFIG_PM_SLEEP is enabled; so use the pm_sleep_ptr() macro instead of pm_ptr(). Signed-off-by: Paul Cercueil <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent d1579e6 commit e0d64ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/mmc/host/jz4740_mmc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,17 +1103,17 @@ static int jz4740_mmc_remove(struct platform_device *pdev)
11031103
return 0;
11041104
}
11051105

1106-
static int __maybe_unused jz4740_mmc_suspend(struct device *dev)
1106+
static int jz4740_mmc_suspend(struct device *dev)
11071107
{
11081108
return pinctrl_pm_select_sleep_state(dev);
11091109
}
11101110

1111-
static int __maybe_unused jz4740_mmc_resume(struct device *dev)
1111+
static int jz4740_mmc_resume(struct device *dev)
11121112
{
11131113
return pinctrl_select_default_state(dev);
11141114
}
11151115

1116-
static SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend,
1116+
DEFINE_SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend,
11171117
jz4740_mmc_resume);
11181118

11191119
static struct platform_driver jz4740_mmc_driver = {
@@ -1123,7 +1123,7 @@ static struct platform_driver jz4740_mmc_driver = {
11231123
.name = "jz4740-mmc",
11241124
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
11251125
.of_match_table = of_match_ptr(jz4740_mmc_of_match),
1126-
.pm = pm_ptr(&jz4740_mmc_pm_ops),
1126+
.pm = pm_sleep_ptr(&jz4740_mmc_pm_ops),
11271127
},
11281128
};
11291129

0 commit comments

Comments
 (0)