The patch titled Subject: drivers/video/backlight/ams369fg06.c: convert ams369fg06 to dev_pm_ops has been added to the -mm tree. Its filename is drivers-video-backlight-ams369fg06c-convert-ams369fg06-to-dev_pm_ops.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jingoo Han <jg1.han@xxxxxxxxxxx> Subject: drivers/video/backlight/ams369fg06.c: convert ams369fg06 to dev_pm_ops Instead of using legacy suspend/resume methods, using newer dev_pm_ops structure allows better control over power management. Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/backlight/ams369fg06.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff -puN drivers/video/backlight/ams369fg06.c~drivers-video-backlight-ams369fg06c-convert-ams369fg06-to-dev_pm_ops drivers/video/backlight/ams369fg06.c --- a/drivers/video/backlight/ams369fg06.c~drivers-video-backlight-ams369fg06c-convert-ams369fg06-to-dev_pm_ops +++ a/drivers/video/backlight/ams369fg06.c @@ -536,11 +536,11 @@ static int ams369fg06_remove(struct spi_ } #if defined(CONFIG_PM) -static int ams369fg06_suspend(struct spi_device *spi, pm_message_t mesg) +static int ams369fg06_suspend(struct device *dev) { - struct ams369fg06 *lcd = spi_get_drvdata(spi); + struct ams369fg06 *lcd = dev_get_drvdata(dev); - dev_dbg(&spi->dev, "lcd->power = %d\n", lcd->power); + dev_dbg(dev, "lcd->power = %d\n", lcd->power); /* * when lcd panel is suspend, lcd panel becomes off @@ -549,17 +549,17 @@ static int ams369fg06_suspend(struct spi return ams369fg06_power(lcd, FB_BLANK_POWERDOWN); } -static int ams369fg06_resume(struct spi_device *spi) +static int ams369fg06_resume(struct device *dev) { - struct ams369fg06 *lcd = spi_get_drvdata(spi); + struct ams369fg06 *lcd = dev_get_drvdata(dev); lcd->power = FB_BLANK_POWERDOWN; return ams369fg06_power(lcd, FB_BLANK_UNBLANK); } -#else -#define ams369fg06_suspend NULL -#define ams369fg06_resume NULL + +static SIMPLE_DEV_PM_OPS(ams369fg06_pm_ops, ams369fg06_suspend, + ams369fg06_resume); #endif static void ams369fg06_shutdown(struct spi_device *spi) @@ -573,12 +573,13 @@ static struct spi_driver ams369fg06_driv .driver = { .name = "ams369fg06", .owner = THIS_MODULE, +#ifdef CONFIG_PM + .pm = &ams369fg06_pm_ops, +#endif }, .probe = ams369fg06_probe, .remove = ams369fg06_remove, .shutdown = ams369fg06_shutdown, - .suspend = ams369fg06_suspend, - .resume = ams369fg06_resume, }; module_spi_driver(ams369fg06_driver); _ Patches currently in -mm which might be from jg1.han@xxxxxxxxxxx are origin.patch linux-next.patch drivers-video-backlight-ams369fg06c-convert-ams369fg06-to-dev_pm_ops.patch rtc-rtc-palmas-use-devm_request_threaded_irq.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html