aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/pxa.c
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2009-07-21 10:48:43 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 07:15:36 -0400
commitbf56c751fa25edf12528e7cef90fb276c3fff17a (patch)
tree6416739d99cc368fa1fdad38b014ea33512fa950 /drivers/serial/pxa.c
parent43ddc00696c96a265a7fc48050b32fd0ed9d59e7 (diff)
[ARM] pxa: update pxa serial driver to use 'struct dev_pm_ops'
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'drivers/serial/pxa.c')
-rw-r--r--drivers/serial/pxa.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index a48a8a13d87b..514971fb5bff 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
729static int serial_pxa_suspend(struct platform_device *dev, pm_message_t state) 729#ifdef CONFIG_PM
730static 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
739static int serial_pxa_resume(struct platform_device *dev) 740static 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
750static struct dev_pm_ops serial_pxa_pm_ops = {
751 .suspend = serial_pxa_suspend,
752 .resume = serial_pxa_resume,
753};
754#endif
755
749static int serial_pxa_probe(struct platform_device *dev) 756static 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