The patch titled Subject: backlight: vgg2432a4: convert vgg2432a4_driver to dev_pm_ops has been added to the -mm tree. Its filename is backlight-vgg2432a4-convert-vgg2432a4_driver-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: vgg2432a4: convert vgg2432a4_driver to dev_pm_ops Instead of using legacy suspend/resume methods, using newer dev_pm_ops structure allows better control over power management. Also, use of pm_message_t is deprecated. Thus, it is removed. Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/backlight/ili9320.c | 24 +++++++++--------------- drivers/video/backlight/ili9320.h | 2 +- drivers/video/backlight/vgg2432a4.c | 18 ++++++++---------- 3 files changed, 18 insertions(+), 26 deletions(-) diff -puN drivers/video/backlight/ili9320.c~backlight-vgg2432a4-convert-vgg2432a4_driver-to-dev_pm_ops drivers/video/backlight/ili9320.c --- a/drivers/video/backlight/ili9320.c~backlight-vgg2432a4-convert-vgg2432a4_driver-to-dev_pm_ops +++ a/drivers/video/backlight/ili9320.c @@ -270,27 +270,21 @@ int ili9320_remove(struct ili9320 *ili) } EXPORT_SYMBOL_GPL(ili9320_remove); -#ifdef CONFIG_PM -int ili9320_suspend(struct ili9320 *lcd, pm_message_t state) +#ifdef CONFIG_PM_SLEEP +int ili9320_suspend(struct ili9320 *lcd) { int ret; - dev_dbg(lcd->dev, "%s: event %d\n", __func__, state.event); + ret = ili9320_power(lcd, FB_BLANK_POWERDOWN); - if (state.event == PM_EVENT_SUSPEND) { - ret = ili9320_power(lcd, FB_BLANK_POWERDOWN); - - if (lcd->platdata->suspend == ILI9320_SUSPEND_DEEP) { - ili9320_write(lcd, ILI9320_POWER1, lcd->power1 | - ILI9320_POWER1_SLP | - ILI9320_POWER1_DSTB); - lcd->initialised = 0; - } - - return ret; + if (lcd->platdata->suspend == ILI9320_SUSPEND_DEEP) { + ili9320_write(lcd, ILI9320_POWER1, lcd->power1 | + ILI9320_POWER1_SLP | + ILI9320_POWER1_DSTB); + lcd->initialised = 0; } - return 0; + return ret; } EXPORT_SYMBOL_GPL(ili9320_suspend); diff -puN drivers/video/backlight/ili9320.h~backlight-vgg2432a4-convert-vgg2432a4_driver-to-dev_pm_ops drivers/video/backlight/ili9320.h --- a/drivers/video/backlight/ili9320.h~backlight-vgg2432a4-convert-vgg2432a4_driver-to-dev_pm_ops +++ a/drivers/video/backlight/ili9320.h @@ -76,5 +76,5 @@ extern void ili9320_shutdown(struct ili9 /* PM */ -extern int ili9320_suspend(struct ili9320 *lcd, pm_message_t state); +extern int ili9320_suspend(struct ili9320 *lcd); extern int ili9320_resume(struct ili9320 *lcd); diff -puN drivers/video/backlight/vgg2432a4.c~backlight-vgg2432a4-convert-vgg2432a4_driver-to-dev_pm_ops drivers/video/backlight/vgg2432a4.c --- a/drivers/video/backlight/vgg2432a4.c~backlight-vgg2432a4-convert-vgg2432a4_driver-to-dev_pm_ops +++ a/drivers/video/backlight/vgg2432a4.c @@ -205,18 +205,15 @@ static int vgg2432a4_lcd_init(struct ili return ret; } -#ifdef CONFIG_PM -static int vgg2432a4_suspend(struct spi_device *spi, pm_message_t state) +#ifdef CONFIG_PM_SLEEP +static int vgg2432a4_suspend(struct device *dev) { - return ili9320_suspend(spi_get_drvdata(spi), state); + return ili9320_suspend(dev_get_drvdata(dev)); } -static int vgg2432a4_resume(struct spi_device *spi) +static int vgg2432a4_resume(struct device *dev) { - return ili9320_resume(spi_get_drvdata(spi)); + return ili9320_resume(dev_get_drvdata(dev)); } -#else -#define vgg2432a4_suspend NULL -#define vgg2432a4_resume NULL #endif static struct ili9320_client vgg2432a4_client = { @@ -249,16 +246,17 @@ static void vgg2432a4_shutdown(struct sp ili9320_shutdown(spi_get_drvdata(spi)); } +static SIMPLE_DEV_PM_OPS(vgg2432a4_pm_ops, vgg2432a4_suspend, vgg2432a4_resume); + static struct spi_driver vgg2432a4_driver = { .driver = { .name = "VGG2432A4", .owner = THIS_MODULE, + .pm = &vgg2432a4_pm_ops, }, .probe = vgg2432a4_probe, .remove = vgg2432a4_remove, .shutdown = vgg2432a4_shutdown, - .suspend = vgg2432a4_suspend, - .resume = vgg2432a4_resume, }; module_spi_driver(vgg2432a4_driver); _ Patches currently in -mm which might be from jg1.han@xxxxxxxxxxx are linux-next.patch drivers-block-mg_diskc-add-config_pm_sleep-to-suspend-resume-functions.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 drivers-video-backlight-l4f00242t03c-check-return-value-of-regulator_enable-fix.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 drivers-video-backlight-kconfig-fix-typo-mach_sam9ek-three-times.patch drivers-video-backlight-adp5520_blc-fix-compiler-warning-in-adp5520_show.patch video-backlight-add-ili922x-lcd-driver.patch backlight-da903x_bl-use-bl_core_suspendresume-option.patch backlight-lp855x-use-page_size-for-the-sysfs-read-operation.patch drivers-video-backlight-adp8860_blc-fix-error-return-code-in-adp8860_led_probe.patch drivers-video-backlight-adp8870_blc-fix-error-return-code-in-adp8870_led_probe.patch drivers-video-backlight-as3711_blc-add-of-support.patch backlight-ili9320-use-spi_set_drvdata.patch backlight-ili922x-use-spi_set_drvdata.patch drivers-video-backlight-platform_lcdc-introduce-probe-callback.patch backlight-omap1-convert-omapbl-to-dev_pm_ops.patch backlight-tosa-convert-tosa-to-dev_pm_ops.patch backlight-vgg2432a4-convert-vgg2432a4_driver-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-s3c-convert-s3c_rtc-to-dev_pm_ops.patch rtc-rtc-ds1307-use-dev_dbg-instead-of-pr_debug.patch rtc-rtc-fm3130-use-dev_dbg-instead-of-pr_debug.patch rtc-rtc-ab3100-use-devm_rtc_device_register.patch rtc-rtc-au1xxx-use-devm_rtc_device_register.patch rtc-rtc-bq32k-use-devm_rtc_device_register.patch rtc-rtc-dm355evm-use-devm_rtc_device_register.patch rtc-rtc-ds1302-use-devm_rtc_device_register.patch rtc-rtc-ds1672-use-devm_rtc_device_register.patch rtc-rtc-ds3234-use-devm_rtc_device_register.patch rtc-rtc-efi-use-devm_rtc_device_register.patch rtc-rtc-em3027-use-devm_rtc_device_register.patch rtc-rtc-generic-use-devm_rtc_device_register.patch rtc-hid-sensor-time-use-devm_rtc_device_register.patch rtc-rtc-ls1x-use-devm_rtc_device_register.patch rtc-rtc-m41t93-use-devm_rtc_device_register.patch rtc-rtc-m41t94-use-devm_rtc_device_register.patch rtc-rtc-m48t86-use-devm_rtc_device_register.patch rtc-rtc-max6900-use-devm_rtc_device_register.patch rtc-rtc-max6902-use-devm_rtc_device_register.patch rtc-rtc-ps3-use-devm_rtc_device_register.patch rtc-rtc-r9701-use-devm_rtc_device_register.patch rtc-rtc-rc5t583-use-devm_rtc_device_register.patch rtc-rtc-rs5c313-use-devm_rtc_device_register.patch rtc-rtc-rv3029c2-use-devm_rtc_device_register.patch rtc-rtc-rx4581-use-devm_rtc_device_register.patch rtc-rtc-rx8581-use-devm_rtc_device_register.patch rtc-rtc-starfire-use-devm_rtc_device_register.patch rtc-rtc-sun4v-use-devm_rtc_device_register.patch rtc-rtc-test-use-devm_rtc_device_register.patch rtc-rtc-tile-use-devm_rtc_device_register.patch rtc-rtc-wm8350-use-devm_rtc_device_register.patch rtc-rtc-x1205-use-devm_rtc_device_register.patch rtc-rtc-at91rm9200-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-mxc-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-pxa-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-rc5t583-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-sa1100-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-sh-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-wm8350-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-tps6586x-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-tps65910-switch-to-using-simple_dev_pm_ops.patch rtc-rtc-tps80031-switch-to-using-simple_dev_pm_ops.patch rtc-omap-update-to-devm_-api.patch drivers-rtc-rtc-ds1374c-add-config_pm_sleep-to-suspend-resume-functions.patch drivers-rtc-rtc-88pm80xc-add-config_pm_sleep-to-suspend-resume-functions.patch drivers-rtc-rtc-tps6586xc-remove-incorrect-use-of-rtc_device_unregister.patch drivers-rtc-rtc-tps65910c-fix-incorrect-return-value-on-error.patch drivers-rtc-rtc-max8997c-fix-incorrect-return-value-on-error.patch drivers-rtc-rtc-max77686c-fix-incorrect-return-value-on-error.patch drivers-rtc-rtc-max8907c-remove-redundant-code.patch rtc-rtc-rx4581-use-spi_set_drvdata.patch rtc-rtc-m41t94-use-spi_set_drvdata.patch rtc-rtc-r9701-use-spi_set_drvdata.patch rtc-rtc-ds3234-use-spi_set_drvdata.patch rtc-rtc-ds1390-use-spi_set_drvdata.patch rtc-rtc-m41t93-use-spi_set_drvdata.patch rtc-rtc-max6902-use-spi_set_drvdata.patch drivers-rtc-rtc-s3cc-use-clk_prepare_enable-and-clk_disable_unprepare.patch drivers-rtc-rtc-88pm860xc-use-devm_-apis.patch drivers-rtc-rtc-at32ap700xc-use-devm_-apis.patch drivers-rtc-rtc-ds1305c-use-devm_-apis.patch drivers-rtc-rtc-ds1374c-use-devm_-apis.patch drivers-rtc-rtc-ds3232c-use-devm_-apis.patch drivers-rtc-rtc-m48t35c-use-devm_-apis.patch drivers-rtc-rtc-max8925c-use-devm_-apis.patch drivers-rtc-rtc-pxac-use-devm_-apis.patch rtc-rtc-ab8500-use-devm_-functions.patch rtc-rtc-at91sam9-use-devm_-functions.patch rtc-rtc-bfin-use-devm_-functions.patch rtc-rtc-bq4802-use-devm_-functions.patch rtc-rtc-ds1216-use-devm_-functions.patch rtc-rtc-ds1286-use-devm_-functions.patch rtc-rtc-ds1390-use-devm_-functions.patch rtc-rtc-ds2404-use-devm_-functions.patch rtc-rtc-fm3130-use-devm_-functions.patch rtc-rtc-isl12022-use-devm_-functions.patch rtc-rtc-m41t80-use-devm_-functions.patch rtc-rtc-max8998-use-devm_-functions.patch rtc-rtc-mc13xxx-use-devm_-functions.patch rtc-rtc-msm6242-use-devm_-functions.patch rtc-rtc-nuc900-use-devm_-functions.patch rtc-rtc-pcap-use-devm_-functions.patch rtc-rtc-pcf2123-use-devm_-functions.patch rtc-rtc-pcf50633-use-devm_-functions.patch rtc-rtc-pcf8563-use-devm_-functions.patch rtc-rtc-pcf8583-use-devm_-functions.patch rtc-rtc-rp5c01-use-devm_-functions.patch rtc-rtc-rs5c348-use-devm_-functions.patch rtc-rtc-rs5c372-use-devm_-functions.patch rtc-rtc-s35390a-use-devm_-functions.patch rtc-rtc-sa1100-use-devm_-functions.patch rtc-rtc-stmp3xxx-use-devm_-functions.patch rtc-rtc-v3020-use-devm_-functions.patch memstick-r592-make-r592_pm_ops-static.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