diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 16:02:24 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 16:02:30 +0100 |
commit | 28f9f19db9dda54c851d5689539d86f6fc008773 (patch) | |
tree | 469f5d7b24871b6fe001b7ad9acac859405f4822 /drivers/serial | |
parent | 40262b2b6efac507005a2c981175266bf81152a7 (diff) | |
parent | 52a7a1cec88acdaf3f8b36a6b1fe904f6eca7ee5 (diff) | |
download | linux-3.10-28f9f19db9dda54c851d5689539d86f6fc008773.tar.gz linux-3.10-28f9f19db9dda54c851d5689539d86f6fc008773.tar.bz2 linux-3.10-28f9f19db9dda54c851d5689539d86f6fc008773.zip |
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/pxa.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index a48a8a13d87..514971fb5bf 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c @@ -726,9 +726,10 @@ static struct uart_driver serial_pxa_reg = { .cons = PXA_CONSOLE, }; -static int serial_pxa_suspend(struct platform_device *dev, pm_message_t state) +#ifdef CONFIG_PM +static int serial_pxa_suspend(struct device *dev) { - struct uart_pxa_port *sport = platform_get_drvdata(dev); + struct uart_pxa_port *sport = dev_get_drvdata(dev); if (sport) uart_suspend_port(&serial_pxa_reg, &sport->port); @@ -736,9 +737,9 @@ static int serial_pxa_suspend(struct platform_device *dev, pm_message_t state) return 0; } -static int serial_pxa_resume(struct platform_device *dev) +static int serial_pxa_resume(struct device *dev) { - struct uart_pxa_port *sport = platform_get_drvdata(dev); + struct uart_pxa_port *sport = dev_get_drvdata(dev); if (sport) uart_resume_port(&serial_pxa_reg, &sport->port); @@ -746,6 +747,12 @@ static int serial_pxa_resume(struct platform_device *dev) return 0; } +static struct dev_pm_ops serial_pxa_pm_ops = { + .suspend = serial_pxa_suspend, + .resume = serial_pxa_resume, +}; +#endif + static int serial_pxa_probe(struct platform_device *dev) { struct uart_pxa_port *sport; @@ -825,11 +832,12 @@ static struct platform_driver serial_pxa_driver = { .probe = serial_pxa_probe, .remove = serial_pxa_remove, - .suspend = serial_pxa_suspend, - .resume = serial_pxa_resume, .driver = { .name = "pxa2xx-uart", .owner = THIS_MODULE, +#ifdef CONFIG_PM + .pm = &serial_pxa_pm_ops, +#endif }, }; |