aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/vr41xx_siu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/vr41xx_siu.c')
-rw-r--r--drivers/serial/vr41xx_siu.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index d61494d185cd..bd6294132c18 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -919,7 +919,7 @@ static struct uart_driver siu_uart_driver = {
919 .cons = SERIAL_VR41XX_CONSOLE, 919 .cons = SERIAL_VR41XX_CONSOLE,
920}; 920};
921 921
922static int siu_probe(struct platform_device *dev) 922static int __devinit siu_probe(struct platform_device *dev)
923{ 923{
924 struct uart_port *port; 924 struct uart_port *port;
925 int num, i, retval; 925 int num, i, retval;
@@ -953,7 +953,7 @@ static int siu_probe(struct platform_device *dev)
953 return 0; 953 return 0;
954} 954}
955 955
956static int siu_remove(struct platform_device *dev) 956static int __devexit siu_remove(struct platform_device *dev)
957{ 957{
958 struct uart_port *port; 958 struct uart_port *port;
959 int i; 959 int i;
@@ -1006,21 +1006,28 @@ static struct platform_device *siu_platform_device;
1006 1006
1007static struct platform_driver siu_device_driver = { 1007static struct platform_driver siu_device_driver = {
1008 .probe = siu_probe, 1008 .probe = siu_probe,
1009 .remove = siu_remove, 1009 .remove = __devexit_p(siu_remove),
1010 .suspend = siu_suspend, 1010 .suspend = siu_suspend,
1011 .resume = siu_resume, 1011 .resume = siu_resume,
1012 .driver = { 1012 .driver = {
1013 .name = "SIU", 1013 .name = "SIU",
1014 .owner = THIS_MODULE,
1014 }, 1015 },
1015}; 1016};
1016 1017
1017static int __devinit vr41xx_siu_init(void) 1018static int __init vr41xx_siu_init(void)
1018{ 1019{
1019 int retval; 1020 int retval;
1020 1021
1021 siu_platform_device = platform_device_register_simple("SIU", -1, NULL, 0); 1022 siu_platform_device = platform_device_alloc("SIU", -1);
1022 if (IS_ERR(siu_platform_device)) 1023 if (!siu_platform_device)
1023 return PTR_ERR(siu_platform_device); 1024 return -ENOMEM;
1025
1026 retval = platform_device_add(siu_platform_device);
1027 if (retval < 0) {
1028 platform_device_put(siu_platform_device);
1029 return retval;
1030 }
1024 1031
1025 retval = platform_driver_register(&siu_device_driver); 1032 retval = platform_driver_register(&siu_device_driver);
1026 if (retval < 0) 1033 if (retval < 0)
@@ -1029,10 +1036,9 @@ static int __devinit vr41xx_siu_init(void)
1029 return retval; 1036 return retval;
1030} 1037}
1031 1038
1032static void __devexit vr41xx_siu_exit(void) 1039static void __exit vr41xx_siu_exit(void)
1033{ 1040{
1034 platform_driver_unregister(&siu_device_driver); 1041 platform_driver_unregister(&siu_device_driver);
1035
1036 platform_device_unregister(siu_platform_device); 1042 platform_device_unregister(siu_platform_device);
1037} 1043}
1038 1044