The patch titled Subject: backlight: lms501kf03: convert lms501kf03 to dev_pm_ops has been added to the -mm tree. Its filename is backlight-lms501kf03-convert-lms501kf03-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: backlight: lms501kf03: convert lms501kf03 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/lms501kf03.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff -puN drivers/video/backlight/lms501kf03.c~backlight-lms501kf03-convert-lms501kf03-to-dev_pm_ops drivers/video/backlight/lms501kf03.c --- a/drivers/video/backlight/lms501kf03.c~backlight-lms501kf03-convert-lms501kf03-to-dev_pm_ops +++ a/drivers/video/backlight/lms501kf03.c @@ -387,13 +387,12 @@ static int lms501kf03_remove(struct spi_ return 0; } -#if defined(CONFIG_PM) - -static int lms501kf03_suspend(struct spi_device *spi, pm_message_t mesg) +#ifdef CONFIG_PM_SLEEP +static int lms501kf03_suspend(struct device *dev) { - struct lms501kf03 *lcd = spi_get_drvdata(spi); + struct lms501kf03 *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 @@ -402,19 +401,19 @@ static int lms501kf03_suspend(struct spi return lms501kf03_power(lcd, FB_BLANK_POWERDOWN); } -static int lms501kf03_resume(struct spi_device *spi) +static int lms501kf03_resume(struct device *dev) { - struct lms501kf03 *lcd = spi_get_drvdata(spi); + struct lms501kf03 *lcd = dev_get_drvdata(dev); lcd->power = FB_BLANK_POWERDOWN; return lms501kf03_power(lcd, FB_BLANK_UNBLANK); } -#else -#define lms501kf03_suspend NULL -#define lms501kf03_resume NULL #endif +static SIMPLE_DEV_PM_OPS(lms501kf03_pm_ops, lms501kf03_suspend, + lms501kf03_resume); + static void lms501kf03_shutdown(struct spi_device *spi) { struct lms501kf03 *lcd = spi_get_drvdata(spi); @@ -426,12 +425,11 @@ static struct spi_driver lms501kf03_driv .driver = { .name = "lms501kf03", .owner = THIS_MODULE, + .pm = &lms501kf03_pm_ops, }, .probe = lms501kf03_probe, .remove = lms501kf03_remove, .shutdown = lms501kf03_shutdown, - .suspend = lms501kf03_suspend, - .resume = lms501kf03_resume, }; module_spi_driver(lms501kf03_driver); _ Patches currently in -mm which might be from jg1.han@xxxxxxxxxxx are linux-next.patch drivers-video-backlight-ams369fg06c-convert-ams369fg06-to-dev_pm_ops.patch drivers-video-backlight-ams369fg06c-convert-ams369fg06-to-dev_pm_ops-fix.patch backlight-platform_lcd-remove-unnecessary-ifdefs.patch backlight-ep93xx_bl-remove-incorrect-__init-annotation.patch drivers-video-backlight-atmel-pwm-blc-use-module_platform_driver_probe.patch drivers-video-backlight-atmel-pwm-blc-add-__init-annotation.patch drivers-video-backlight-lp855x_blc-fix-compiler-warning-in-lp855x_probe.patch drivers-video-backlight-jornada720_c-use-dev_err-dev_info-instead-of-pr_err-pr_info.patch drivers-video-backlight-omap1_blc-use-dev_info-instead-of-pr_info.patch drivers-video-backlight-generic_blc-use-dev_info-instead-of-pr_info.patch backlight-adp8870-add-missing-braces.patch drivers-video-backlight-l4f00242t03c-check-return-value-of-regulator_enable.patch backlight-ld9040-convert-ld9040-to-dev_pm_ops.patch backlight-lms501kf03-convert-lms501kf03-to-dev_pm_ops.patch backlight-s6e63m0-convert-s6e63m0-to-dev_pm_ops.patch backlight-adp5520-convert-adp5520_bl-to-dev_pm_ops.patch backlight-adp8860-convert-adp8860-to-dev_pm_ops.patch backlight-adp8870-convert-adp8870-to-dev_pm_ops.patch backlight-corgi_lcd-convert-corgi_lcd-to-dev_pm_ops.patch backlight-ep93xx-convert-ep93xx-to-dev_pm_ops.patch backlight-hp680_bl-convert-hp680bl-to-dev_pm_ops.patch backlight-kb3886_bl-convert-kb3886bl-to-dev_pm_ops.patch backlight-lm3533_bl-convert-lm3533_bl-to-dev_pm_ops.patch backlight-locomolcd-convert-locomolcd-to-dev_pm_ops.patch backlight-ltv350qv-convert-ltv350qv-to-dev_pm_ops.patch backlight-tdo24m-convert-tdo24m-to-dev_pm_ops.patch rtc-rtc-mv-add-__init-annotation.patch rtc-rtc-davinci-add-__exit-annotation.patch rtc-rtc-ds1302-add-__exit-annotation.patch rtc-rtc-imxdi-add-__init-__exit-annotation.patch rtc-rtc-nuc900-add-__init-__exit-annotation.patch rtc-rtc-pcap-add-__init-__exit-annotation.patch rtc-rtc-tegra-add-__init-__exit-annotation.patch rtc-add-devm_rtc_device_registerunregister.patch rtc-max77686-use-module_platform_driver.patch rtc-max77686-add-missing-module-author-name.patch rtc-max77686-use-devm_kzalloc.patch rtc-max77686-fix-indentation-of-bit-definitions.patch rtc-max77686-use-dev_info-dev_emerg-instead-of-pr_info-pr_emerg.patch rtc-rtc-v3020-use-gpio_request_array.patch rtc-use-struct-device-as-the-first-argument-for-devm_rtc_device_register.patch rtc-rtc-ab3100-use-module_platform_driver_probe.patch rtc-rtc-at32ap700x-use-module_platform_driver_probe.patch rtc-rtc-at91rm9200-use-module_platform_driver_probe.patch rtc-rtc-au1xxx-use-module_platform_driver_probe.patch rtc-rtc-coh901331-use-module_platform_driver_probe.patch rtc-rtc-davinci-use-module_platform_driver_probe.patch rtc-rtc-ds1302-use-module_platform_driver_probe.patch rtc-rtc-efi-use-module_platform_driver_probe.patch rtc-rtc-generic-use-module_platform_driver_probe.patch rtc-rtc-imxdi-use-module_platform_driver_probe.patch rtc-rtc-mc13xxx-use-module_platform_driver_probe.patch rtc-rtc-msm6242-use-module_platform_driver_probe.patch rtc-rtc-mv-use-module_platform_driver_probe.patch rtc-rtc-nuc900-use-module_platform_driver_probe.patch rtc-rtc-omap-use-module_platform_driver_probe.patch rtc-rtc-pcap-use-module_platform_driver_probe.patch rtc-rtc-ps3-use-module_platform_driver_probe.patch rtc-rtc-pxa-use-module_platform_driver_probe.patch rtc-rtc-rp5c01-use-module_platform_driver_probe.patch rtc-rtc-sh-use-module_platform_driver_probe.patch rtc-rtc-starfire-use-module_platform_driver_probe.patch rtc-rtc-sun4v-use-module_platform_driver_probe.patch rtc-rtc-tegra-use-module_platform_driver_probe.patch rtc-rtc-tx4939-use-module_platform_driver_probe.patch rtc-rtc-88pm80x-use-devm_rtc_device_register.patch rtc-rtc-coh90133-use-devm_rtc_device_register.patch rtc-rtc-da9052-use-devm_rtc_device_register.patch rtc-rtc-da9055-use-devm_rtc_device_register.patch rtc-rtc-davinci-use-devm_rtc_device_register.patch rtc-rtc-ds1511-use-devm_rtc_device_register.patch rtc-rtc-ds1553-use-devm_rtc_device_register.patch rtc-rtc-ds1742-use-devm_rtc_device_register.patch rtc-rtc-ep93xx-use-devm_rtc_device_register.patch rtc-rtc-imxdi-use-devm_rtc_device_register.patch rtc-rtc-lp8788-use-devm_rtc_device_register.patch rtc-rtc-lpc32xx-use-devm_rtc_device_register.patch rtc-rtc-max77686-use-devm_rtc_device_register.patch rtc-rtc-max8907-use-devm_rtc_device_register.patch rtc-rtc-max8997-use-devm_rtc_device_register.patch rtc-rtc-mv-use-devm_rtc_device_register.patch rtc-rtc-mxc-use-devm_rtc_device_register.patch rtc-rtc-palmas-use-devm_rtc_device_register.patch rtc-rtc-pcf8523-use-devm_rtc_device_register.patch rtc-rtc-s3c-use-devm_rtc_device_register.patch rtc-rtc-snvs-use-devm_rtc_device_register.patch rtc-rtc-spear-use-devm_rtc_device_register.patch rtc-rtc-stk17ta8-use-devm_rtc_device_register.patch rtc-rtc-tps6586x-use-devm_rtc_device_register.patch rtc-rtc-tps65910-use-devm_rtc_device_register.patch rtc-rtc-tps80031-use-devm_rtc_device_register.patch rtc-rtc-tx4939-use-devm_rtc_device_register.patch rtc-rtc-vt8500-use-devm_rtc_device_register.patch rtc-rtc-wm831x-use-devm_rtc_device_register.patch rtc-tegra-protect-suspend-resume-callbacks-with-config_pm_sleep.patch rtc-tegra-use-struct-dev_pm_ops-for-power-management.patch rtc-tegra-set-irq-name-as-device-name.patch rtc-tegra-use-managed-rtc_device_register.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