Skip to content

Commit 2cdbd92

Browse files
pcercueirafaeljw
authored andcommitted
mmc: mxc: Use the new PM macros
Use DEFINE_SIMPLE_DEV_PM_OPS() instead of the SIMPLE_DEV_PM_OPS() macro, along with using pm_sleep_ptr() as this driver doesn't handle runtime PM. This makes it possible to remove the #ifdef CONFIG_PM guard around the suspend/resume functions. Signed-off-by: Paul Cercueil <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent e0d64ec commit 2cdbd92

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/mmc/host/mxcmmc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,6 @@ static int mxcmci_remove(struct platform_device *pdev)
11831183
return 0;
11841184
}
11851185

1186-
#ifdef CONFIG_PM_SLEEP
11871186
static int mxcmci_suspend(struct device *dev)
11881187
{
11891188
struct mmc_host *mmc = dev_get_drvdata(dev);
@@ -1210,17 +1209,16 @@ static int mxcmci_resume(struct device *dev)
12101209

12111210
return ret;
12121211
}
1213-
#endif
12141212

1215-
static SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume);
1213+
DEFINE_SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume);
12161214

12171215
static struct platform_driver mxcmci_driver = {
12181216
.probe = mxcmci_probe,
12191217
.remove = mxcmci_remove,
12201218
.driver = {
12211219
.name = DRIVER_NAME,
12221220
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
1223-
.pm = &mxcmci_pm_ops,
1221+
.pm = pm_sleep_ptr(&mxcmci_pm_ops),
12241222
.of_match_table = mxcmci_of_match,
12251223
}
12261224
};

0 commit comments

Comments
 (0)