aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/ioc3_serial.c4
-rw-r--r--drivers/serial/ioc4_serial.c20
-rw-r--r--drivers/serial/pxa.c2
-rw-r--r--drivers/serial/sh-sci.c2
4 files changed, 19 insertions, 9 deletions
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index d8983dd5c4b2..85dc0410ac1a 100644
--- a/drivers/serial/ioc3_serial.c
+++ b/drivers/serial/ioc3_serial.c
@@ -2162,7 +2162,7 @@ static struct ioc3_submodule ioc3uart_ops = {
2162/** 2162/**
2163 * ioc3_detect - module init called, 2163 * ioc3_detect - module init called,
2164 */ 2164 */
2165static int __devinit ioc3uart_init(void) 2165static int __init ioc3uart_init(void)
2166{ 2166{
2167 int ret; 2167 int ret;
2168 2168
@@ -2179,7 +2179,7 @@ static int __devinit ioc3uart_init(void)
2179 return ret; 2179 return ret;
2180} 2180}
2181 2181
2182static void __devexit ioc3uart_exit(void) 2182static void __exit ioc3uart_exit(void)
2183{ 2183{
2184 ioc3_unregister_submodule(&ioc3uart_ops); 2184 ioc3_unregister_submodule(&ioc3uart_ops);
2185 uart_unregister_driver(&ioc3_uart); 2185 uart_unregister_driver(&ioc3_uart);
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index 2e02c3026d24..836d9ab4f729 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -2904,7 +2904,7 @@ static struct ioc4_submodule ioc4_serial_submodule = {
2904/** 2904/**
2905 * ioc4_serial_init - module init 2905 * ioc4_serial_init - module init
2906 */ 2906 */
2907int ioc4_serial_init(void) 2907static int __init ioc4_serial_init(void)
2908{ 2908{
2909 int ret; 2909 int ret;
2910 2910
@@ -2913,20 +2913,30 @@ int ioc4_serial_init(void)
2913 printk(KERN_WARNING 2913 printk(KERN_WARNING
2914 "%s: Couldn't register rs232 IOC4 serial driver\n", 2914 "%s: Couldn't register rs232 IOC4 serial driver\n",
2915 __func__); 2915 __func__);
2916 return ret; 2916 goto out;
2917 } 2917 }
2918 if ((ret = uart_register_driver(&ioc4_uart_rs422)) < 0) { 2918 if ((ret = uart_register_driver(&ioc4_uart_rs422)) < 0) {
2919 printk(KERN_WARNING 2919 printk(KERN_WARNING
2920 "%s: Couldn't register rs422 IOC4 serial driver\n", 2920 "%s: Couldn't register rs422 IOC4 serial driver\n",
2921 __func__); 2921 __func__);
2922 return ret; 2922 goto out_uart_rs232;
2923 } 2923 }
2924 2924
2925 /* register with IOC4 main module */ 2925 /* register with IOC4 main module */
2926 return ioc4_register_submodule(&ioc4_serial_submodule); 2926 ret = ioc4_register_submodule(&ioc4_serial_submodule);
2927 if (ret)
2928 goto out_uart_rs422;
2929 return 0;
2930
2931out_uart_rs422:
2932 uart_unregister_driver(&ioc4_uart_rs422);
2933out_uart_rs232:
2934 uart_unregister_driver(&ioc4_uart_rs232);
2935out:
2936 return ret;
2927} 2937}
2928 2938
2929static void __devexit ioc4_serial_exit(void) 2939static void __exit ioc4_serial_exit(void)
2930{ 2940{
2931 ioc4_unregister_submodule(&ioc4_serial_submodule); 2941 ioc4_unregister_submodule(&ioc4_serial_submodule);
2932 uart_unregister_driver(&ioc4_uart_rs232); 2942 uart_unregister_driver(&ioc4_uart_rs232);
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 4a821046baae..56ee082157aa 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -756,7 +756,7 @@ static int serial_pxa_resume(struct device *dev)
756 return 0; 756 return 0;
757} 757}
758 758
759static struct dev_pm_ops serial_pxa_pm_ops = { 759static const struct dev_pm_ops serial_pxa_pm_ops = {
760 .suspend = serial_pxa_suspend, 760 .suspend = serial_pxa_suspend,
761 .resume = serial_pxa_resume, 761 .resume = serial_pxa_resume,
762}; 762};
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index d96c7c7f1b22..68c7f6cfd728 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1344,7 +1344,7 @@ static int sci_resume(struct device *dev)
1344 return 0; 1344 return 0;
1345} 1345}
1346 1346
1347static struct dev_pm_ops sci_dev_pm_ops = { 1347static const struct dev_pm_ops sci_dev_pm_ops = {
1348 .suspend = sci_suspend, 1348 .suspend = sci_suspend,
1349 .resume = sci_resume, 1349 .resume = sci_resume,
1350}; 1350};