diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-07-08 13:22:04 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-07-22 00:28:38 +0200 |
commit | 79ee031ff6fd23a1a2a4f783cfc3421885304ce3 (patch) | |
tree | 085ba3d5839af93bcda7c10c67906b58db4f14cd /arch/arm/plat-omap/debug-leds.c | |
parent | d7aacaddcac3971e33cf52d7e610c06696cb347f (diff) | |
download | blackbird-op-linux-79ee031ff6fd23a1a2a4f783cfc3421885304ce3.tar.gz blackbird-op-linux-79ee031ff6fd23a1a2a4f783cfc3421885304ce3.zip |
ARM: Rework omap suspend_late()/resume_early()
This patch reworks platform driver power management code
for omap drivers using late/early legacy callbacks.
The callbacks are converted for CONFIG_SUSPEND like this:
suspend_late() -> suspend_noirq()
resume_early() -> resume_noirq()
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/plat-omap/debug-leds.c')
-rw-r--r-- | arch/arm/plat-omap/debug-leds.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index be4eefda4767..9395898dd49a 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c @@ -281,24 +281,27 @@ static int /* __init */ fpga_probe(struct platform_device *pdev) return 0; } -static int fpga_suspend_late(struct platform_device *pdev, pm_message_t mesg) +static int fpga_suspend_noirq(struct device *dev) { __raw_writew(~0, &fpga->leds); return 0; } -static int fpga_resume_early(struct platform_device *pdev) +static int fpga_resume_noirq(struct device *dev) { __raw_writew(~hw_led_state, &fpga->leds); return 0; } +static struct dev_pm_ops fpga_dev_pm_ops = { + .suspend_noirq = fpga_suspend_noirq, + .resume_noirq = fpga_resume_noirq, +}; static struct platform_driver led_driver = { .driver.name = "omap_dbg_led", + .driver.pm = &fpga_dev_pm_ops, .probe = fpga_probe, - .suspend_late = fpga_suspend_late, - .resume_early = fpga_resume_early, }; static int __init fpga_init(void) |