aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250.c10
-rw-r--r--drivers/serial/imx.c8
-rw-r--r--drivers/serial/mpc52xx_uart.c8
-rw-r--r--drivers/serial/pxa.c8
-rw-r--r--drivers/serial/s3c2410.c9
-rw-r--r--drivers/serial/sa1100.c8
-rw-r--r--drivers/serial/vr41xx_siu.c10
7 files changed, 24 insertions, 37 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 4d75cdfa0a0a..afb7ddf200e0 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2358,13 +2358,10 @@ static int __devexit serial8250_remove(struct device *dev)
2358 return 0; 2358 return 0;
2359} 2359}
2360 2360
2361static int serial8250_suspend(struct device *dev, pm_message_t state, u32 level) 2361static int serial8250_suspend(struct device *dev, pm_message_t state)
2362{ 2362{
2363 int i; 2363 int i;
2364 2364
2365 if (level != SUSPEND_DISABLE)
2366 return 0;
2367
2368 for (i = 0; i < UART_NR; i++) { 2365 for (i = 0; i < UART_NR; i++) {
2369 struct uart_8250_port *up = &serial8250_ports[i]; 2366 struct uart_8250_port *up = &serial8250_ports[i];
2370 2367
@@ -2375,13 +2372,10 @@ static int serial8250_suspend(struct device *dev, pm_message_t state, u32 level)
2375 return 0; 2372 return 0;
2376} 2373}
2377 2374
2378static int serial8250_resume(struct device *dev, u32 level) 2375static int serial8250_resume(struct device *dev)
2379{ 2376{
2380 int i; 2377 int i;
2381 2378
2382 if (level != RESUME_ENABLE)
2383 return 0;
2384
2385 for (i = 0; i < UART_NR; i++) { 2379 for (i = 0; i < UART_NR; i++) {
2386 struct uart_8250_port *up = &serial8250_ports[i]; 2380 struct uart_8250_port *up = &serial8250_ports[i];
2387 2381
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index bdb4e454b8b0..5b3933b0c997 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -921,21 +921,21 @@ static struct uart_driver imx_reg = {
921 .cons = IMX_CONSOLE, 921 .cons = IMX_CONSOLE,
922}; 922};
923 923
924static int serial_imx_suspend(struct device *_dev, pm_message_t state, u32 level) 924static int serial_imx_suspend(struct device *_dev, pm_message_t state)
925{ 925{
926 struct imx_port *sport = dev_get_drvdata(_dev); 926 struct imx_port *sport = dev_get_drvdata(_dev);
927 927
928 if (sport && level == SUSPEND_DISABLE) 928 if (sport)
929 uart_suspend_port(&imx_reg, &sport->port); 929 uart_suspend_port(&imx_reg, &sport->port);
930 930
931 return 0; 931 return 0;
932} 932}
933 933
934static int serial_imx_resume(struct device *_dev, u32 level) 934static int serial_imx_resume(struct device *_dev)
935{ 935{
936 struct imx_port *sport = dev_get_drvdata(_dev); 936 struct imx_port *sport = dev_get_drvdata(_dev);
937 937
938 if (sport && level == RESUME_ENABLE) 938 if (sport)
939 uart_resume_port(&imx_reg, &sport->port); 939 uart_resume_port(&imx_reg, &sport->port);
940 940
941 return 0; 941 return 0;
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 0585ab27ffde..8a79968f8ce1 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -781,22 +781,22 @@ mpc52xx_uart_remove(struct device *dev)
781 781
782#ifdef CONFIG_PM 782#ifdef CONFIG_PM
783static int 783static int
784mpc52xx_uart_suspend(struct device *dev, pm_message_t state, u32 level) 784mpc52xx_uart_suspend(struct device *dev, pm_message_t state)
785{ 785{
786 struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev); 786 struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev);
787 787
788 if (sport && level == SUSPEND_DISABLE) 788 if (sport)
789 uart_suspend_port(&mpc52xx_uart_driver, port); 789 uart_suspend_port(&mpc52xx_uart_driver, port);
790 790
791 return 0; 791 return 0;
792} 792}
793 793
794static int 794static int
795mpc52xx_uart_resume(struct device *dev, u32 level) 795mpc52xx_uart_resume(struct device *dev)
796{ 796{
797 struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev); 797 struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev);
798 798
799 if (port && level == RESUME_ENABLE) 799 if (port)
800 uart_resume_port(&mpc52xx_uart_driver, port); 800 uart_resume_port(&mpc52xx_uart_driver, port);
801 801
802 return 0; 802 return 0;
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 90c2a86c421b..7999686d7b47 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -786,21 +786,21 @@ static struct uart_driver serial_pxa_reg = {
786 .cons = PXA_CONSOLE, 786 .cons = PXA_CONSOLE,
787}; 787};
788 788
789static int serial_pxa_suspend(struct device *_dev, pm_message_t state, u32 level) 789static int serial_pxa_suspend(struct device *_dev, pm_message_t state)
790{ 790{
791 struct uart_pxa_port *sport = dev_get_drvdata(_dev); 791 struct uart_pxa_port *sport = dev_get_drvdata(_dev);
792 792
793 if (sport && level == SUSPEND_DISABLE) 793 if (sport)
794 uart_suspend_port(&serial_pxa_reg, &sport->port); 794 uart_suspend_port(&serial_pxa_reg, &sport->port);
795 795
796 return 0; 796 return 0;
797} 797}
798 798
799static int serial_pxa_resume(struct device *_dev, u32 level) 799static int serial_pxa_resume(struct device *_dev)
800{ 800{
801 struct uart_pxa_port *sport = dev_get_drvdata(_dev); 801 struct uart_pxa_port *sport = dev_get_drvdata(_dev);
802 802
803 if (sport && level == RESUME_ENABLE) 803 if (sport)
804 uart_resume_port(&serial_pxa_reg, &sport->port); 804 uart_resume_port(&serial_pxa_reg, &sport->port);
805 805
806 return 0; 806 return 0;
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 52692aa345ec..06a17dff1a73 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1134,23 +1134,22 @@ static int s3c24xx_serial_remove(struct device *_dev)
1134 1134
1135#ifdef CONFIG_PM 1135#ifdef CONFIG_PM
1136 1136
1137static int s3c24xx_serial_suspend(struct device *dev, pm_message_t state, 1137static int s3c24xx_serial_suspend(struct device *dev, pm_message_t state)
1138 u32 level)
1139{ 1138{
1140 struct uart_port *port = s3c24xx_dev_to_port(dev); 1139 struct uart_port *port = s3c24xx_dev_to_port(dev);
1141 1140
1142 if (port && level == SUSPEND_DISABLE) 1141 if (port)
1143 uart_suspend_port(&s3c24xx_uart_drv, port); 1142 uart_suspend_port(&s3c24xx_uart_drv, port);
1144 1143
1145 return 0; 1144 return 0;
1146} 1145}
1147 1146
1148static int s3c24xx_serial_resume(struct device *dev, u32 level) 1147static int s3c24xx_serial_resume(struct device *dev)
1149{ 1148{
1150 struct uart_port *port = s3c24xx_dev_to_port(dev); 1149 struct uart_port *port = s3c24xx_dev_to_port(dev);
1151 struct s3c24xx_uart_port *ourport = to_ourport(port); 1150 struct s3c24xx_uart_port *ourport = to_ourport(port);
1152 1151
1153 if (port && level == RESUME_ENABLE) { 1152 if (port) {
1154 clk_enable(ourport->clk); 1153 clk_enable(ourport->clk);
1155 s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port)); 1154 s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port));
1156 clk_disable(ourport->clk); 1155 clk_disable(ourport->clk);
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index dd8aed242357..c4a789e6af44 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -834,21 +834,21 @@ static struct uart_driver sa1100_reg = {
834 .cons = SA1100_CONSOLE, 834 .cons = SA1100_CONSOLE,
835}; 835};
836 836
837static int sa1100_serial_suspend(struct device *_dev, pm_message_t state, u32 level) 837static int sa1100_serial_suspend(struct device *_dev, pm_message_t state)
838{ 838{
839 struct sa1100_port *sport = dev_get_drvdata(_dev); 839 struct sa1100_port *sport = dev_get_drvdata(_dev);
840 840
841 if (sport && level == SUSPEND_DISABLE) 841 if (sport)
842 uart_suspend_port(&sa1100_reg, &sport->port); 842 uart_suspend_port(&sa1100_reg, &sport->port);
843 843
844 return 0; 844 return 0;
845} 845}
846 846
847static int sa1100_serial_resume(struct device *_dev, u32 level) 847static int sa1100_serial_resume(struct device *_dev)
848{ 848{
849 struct sa1100_port *sport = dev_get_drvdata(_dev); 849 struct sa1100_port *sport = dev_get_drvdata(_dev);
850 850
851 if (sport && level == RESUME_ENABLE) 851 if (sport)
852 uart_resume_port(&sa1100_reg, &sport->port); 852 uart_resume_port(&sa1100_reg, &sport->port);
853 853
854 return 0; 854 return 0;
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index 0c5d65a08f6e..2b623ab0e36e 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -976,14 +976,11 @@ static int siu_remove(struct device *dev)
976 return 0; 976 return 0;
977} 977}
978 978
979static int siu_suspend(struct device *dev, pm_message_t state, u32 level) 979static int siu_suspend(struct device *dev, pm_message_t state)
980{ 980{
981 struct uart_port *port; 981 struct uart_port *port;
982 int i; 982 int i;
983 983
984 if (level != SUSPEND_DISABLE)
985 return 0;
986
987 for (i = 0; i < siu_uart_driver.nr; i++) { 984 for (i = 0; i < siu_uart_driver.nr; i++) {
988 port = &siu_uart_ports[i]; 985 port = &siu_uart_ports[i];
989 if ((port->type == PORT_VR41XX_SIU || 986 if ((port->type == PORT_VR41XX_SIU ||
@@ -995,14 +992,11 @@ static int siu_suspend(struct device *dev, pm_message_t state, u32 level)
995 return 0; 992 return 0;
996} 993}
997 994
998static int siu_resume(struct device *dev, u32 level) 995static int siu_resume(struct device *dev)
999{ 996{
1000 struct uart_port *port; 997 struct uart_port *port;
1001 int i; 998 int i;
1002 999
1003 if (level != RESUME_ENABLE)
1004 return 0;
1005
1006 for (i = 0; i < siu_uart_driver.nr; i++) { 1000 for (i = 0; i < siu_uart_driver.nr; i++) {
1007 port = &siu_uart_ports[i]; 1001 port = &siu_uart_ports[i];
1008 if ((port->type == PORT_VR41XX_SIU || 1002 if ((port->type == PORT_VR41XX_SIU ||