diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 11:02:24 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 11:02:30 -0400 |
commit | 28f9f19db9dda54c851d5689539d86f6fc008773 (patch) | |
tree | 469f5d7b24871b6fe001b7ad9acac859405f4822 /drivers/serial | |
parent | 40262b2b6efac507005a2c981175266bf81152a7 (diff) | |
parent | 52a7a1cec88acdaf3f8b36a6b1fe904f6eca7ee5 (diff) |
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 = { | |||
726 | .cons = PXA_CONSOLE, | 726 | .cons = PXA_CONSOLE, |
727 | }; | 727 | }; |
728 | 728 | ||
729 | static int serial_pxa_suspend(struct platform_device *dev, pm_message_t state) | 729 | #ifdef CONFIG_PM |
730 | static int serial_pxa_suspend(struct device *dev) | ||
730 | { | 731 | { |
731 | struct uart_pxa_port *sport = platform_get_drvdata(dev); | 732 | struct uart_pxa_port *sport = dev_get_drvdata(dev); |
732 | 733 | ||
733 | if (sport) | 734 | if (sport) |
734 | uart_suspend_port(&serial_pxa_reg, &sport->port); | 735 | 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) | |||
736 | return 0; | 737 | return 0; |
737 | } | 738 | } |
738 | 739 | ||
739 | static int serial_pxa_resume(struct platform_device *dev) | 740 | static int serial_pxa_resume(struct device *dev) |
740 | { | 741 | { |
741 | struct uart_pxa_port *sport = platform_get_drvdata(dev); | 742 | struct uart_pxa_port *sport = dev_get_drvdata(dev); |
742 | 743 | ||
743 | if (sport) | 744 | if (sport) |
744 | uart_resume_port(&serial_pxa_reg, &sport->port); | 745 | uart_resume_port(&serial_pxa_reg, &sport->port); |
@@ -746,6 +747,12 @@ static int serial_pxa_resume(struct platform_device *dev) | |||
746 | return 0; | 747 | return 0; |
747 | } | 748 | } |
748 | 749 | ||
750 | static struct dev_pm_ops serial_pxa_pm_ops = { | ||
751 | .suspend = serial_pxa_suspend, | ||
752 | .resume = serial_pxa_resume, | ||
753 | }; | ||
754 | #endif | ||
755 | |||
749 | static int serial_pxa_probe(struct platform_device *dev) | 756 | static int serial_pxa_probe(struct platform_device *dev) |
750 | { | 757 | { |
751 | struct uart_pxa_port *sport; | 758 | struct uart_pxa_port *sport; |
@@ -825,11 +832,12 @@ static struct platform_driver serial_pxa_driver = { | |||
825 | .probe = serial_pxa_probe, | 832 | .probe = serial_pxa_probe, |
826 | .remove = serial_pxa_remove, | 833 | .remove = serial_pxa_remove, |
827 | 834 | ||
828 | .suspend = serial_pxa_suspend, | ||
829 | .resume = serial_pxa_resume, | ||
830 | .driver = { | 835 | .driver = { |
831 | .name = "pxa2xx-uart", | 836 | .name = "pxa2xx-uart", |
832 | .owner = THIS_MODULE, | 837 | .owner = THIS_MODULE, |
838 | #ifdef CONFIG_PM | ||
839 | .pm = &serial_pxa_pm_ops, | ||
840 | #endif | ||
833 | }, | 841 | }, |
834 | }; | 842 | }; |
835 | 843 | ||