On 30 October 2013 23:18, Guennadi Liakhovetski <g.liakhovetski@xxxxxx> wrote: > Hi Ulf > > On Tue, 22 Oct 2013, Ulf Hansson wrote: > >> Use SET_SYSTEM_SLEEP_PM_OPS to simplify code. >> >> Cc: Guennadi Liakhovetski <g.liakhovetski@xxxxxx> >> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> >> --- >> drivers/mmc/host/sh_mmcif.c | 10 +++------- >> 1 file changed, 3 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c >> index 6bffebe..32bc412 100644 >> --- a/drivers/mmc/host/sh_mmcif.c >> +++ b/drivers/mmc/host/sh_mmcif.c >> @@ -1538,7 +1538,7 @@ static int sh_mmcif_remove(struct platform_device *pdev) >> return 0; >> } >> >> -#ifdef CONFIG_PM >> +#ifdef CONFIG_PM_SLEEP >> static int sh_mmcif_suspend(struct device *dev) >> { >> struct sh_mmcif_host *host = dev_get_drvdata(dev); >> @@ -1552,10 +1552,7 @@ static int sh_mmcif_resume(struct device *dev) >> { >> return 0; >> } >> -#else >> -#define sh_mmcif_suspend NULL >> -#define sh_mmcif_resume NULL >> -#endif /* CONFIG_PM */ >> +#endif >> >> static const struct of_device_id mmcif_of_match[] = { >> { .compatible = "renesas,sh-mmcif" }, >> @@ -1564,8 +1561,7 @@ static const struct of_device_id mmcif_of_match[] = { >> MODULE_DEVICE_TABLE(of, mmcif_of_match); >> >> static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { >> - .suspend = sh_mmcif_suspend, >> - .resume = sh_mmcif_resume, >> + SET_SYSTEM_SLEEP_PM_OPS(sh_mmcif_suspend, sh_mmcif_resume) >> }; > > You could then even use SIMPLE_DEV_PM_OPS(). Well, since a later patch in this patchset make use of "SET_RUNTIME_PM_OPS", using SIMPLE_DEV_PM_OPS is not meaningful I think. Kind regards Ulf Hansson > > Thanks > Guennadi > >> >> static struct platform_driver sh_mmcif_driver = { >> -- >> 1.7.9.5 >> > > --- > Guennadi Liakhovetski, Ph.D. > Freelance Open-Source Software Developer > http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html