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.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index 01696b3e3f61..865d4dea65df 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -924,7 +924,7 @@ static struct uart_driver siu_uart_driver = {
924 .cons = SERIAL_VR41XX_CONSOLE, 924 .cons = SERIAL_VR41XX_CONSOLE,
925}; 925};
926 926
927static int siu_probe(struct device *dev) 927static int siu_probe(struct platform_device *dev)
928{ 928{
929 struct uart_port *port; 929 struct uart_port *port;
930 int num, i, retval; 930 int num, i, retval;
@@ -941,7 +941,7 @@ static int siu_probe(struct device *dev)
941 for (i = 0; i < num; i++) { 941 for (i = 0; i < num; i++) {
942 port = &siu_uart_ports[i]; 942 port = &siu_uart_ports[i];
943 port->ops = &siu_uart_ops; 943 port->ops = &siu_uart_ops;
944 port->dev = dev; 944 port->dev = &dev->dev;
945 945
946 retval = uart_add_one_port(&siu_uart_driver, port); 946 retval = uart_add_one_port(&siu_uart_driver, port);
947 if (retval < 0) { 947 if (retval < 0) {
@@ -958,14 +958,14 @@ static int siu_probe(struct device *dev)
958 return 0; 958 return 0;
959} 959}
960 960
961static int siu_remove(struct device *dev) 961static int siu_remove(struct platform_device *dev)
962{ 962{
963 struct uart_port *port; 963 struct uart_port *port;
964 int i; 964 int i;
965 965
966 for (i = 0; i < siu_uart_driver.nr; i++) { 966 for (i = 0; i < siu_uart_driver.nr; i++) {
967 port = &siu_uart_ports[i]; 967 port = &siu_uart_ports[i];
968 if (port->dev == dev) { 968 if (port->dev == &dev->dev) {
969 uart_remove_one_port(&siu_uart_driver, port); 969 uart_remove_one_port(&siu_uart_driver, port);
970 port->dev = NULL; 970 port->dev = NULL;
971 } 971 }
@@ -976,7 +976,7 @@ 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) 979static int siu_suspend(struct platform_device *dev, pm_message_t state)
980{ 980{
981 struct uart_port *port; 981 struct uart_port *port;
982 int i; 982 int i;
@@ -984,7 +984,7 @@ static int siu_suspend(struct device *dev, pm_message_t state)
984 for (i = 0; i < siu_uart_driver.nr; i++) { 984 for (i = 0; i < siu_uart_driver.nr; i++) {
985 port = &siu_uart_ports[i]; 985 port = &siu_uart_ports[i];
986 if ((port->type == PORT_VR41XX_SIU || 986 if ((port->type == PORT_VR41XX_SIU ||
987 port->type == PORT_VR41XX_DSIU) && port->dev == dev) 987 port->type == PORT_VR41XX_DSIU) && port->dev == &dev->dev)
988 uart_suspend_port(&siu_uart_driver, port); 988 uart_suspend_port(&siu_uart_driver, port);
989 989
990 } 990 }
@@ -992,7 +992,7 @@ static int siu_suspend(struct device *dev, pm_message_t state)
992 return 0; 992 return 0;
993} 993}
994 994
995static int siu_resume(struct device *dev) 995static int siu_resume(struct platform_device *dev)
996{ 996{
997 struct uart_port *port; 997 struct uart_port *port;
998 int i; 998 int i;
@@ -1000,7 +1000,7 @@ static int siu_resume(struct device *dev)
1000 for (i = 0; i < siu_uart_driver.nr; i++) { 1000 for (i = 0; i < siu_uart_driver.nr; i++) {
1001 port = &siu_uart_ports[i]; 1001 port = &siu_uart_ports[i];
1002 if ((port->type == PORT_VR41XX_SIU || 1002 if ((port->type == PORT_VR41XX_SIU ||
1003 port->type == PORT_VR41XX_DSIU) && port->dev == dev) 1003 port->type == PORT_VR41XX_DSIU) && port->dev == &dev->dev)
1004 uart_resume_port(&siu_uart_driver, port); 1004 uart_resume_port(&siu_uart_driver, port);
1005 } 1005 }
1006 1006
@@ -1009,13 +1009,14 @@ static int siu_resume(struct device *dev)
1009 1009
1010static struct platform_device *siu_platform_device; 1010static struct platform_device *siu_platform_device;
1011 1011
1012static struct device_driver siu_device_driver = { 1012static struct platform_driver siu_device_driver = {
1013 .name = "SIU",
1014 .bus = &platform_bus_type,
1015 .probe = siu_probe, 1013 .probe = siu_probe,
1016 .remove = siu_remove, 1014 .remove = siu_remove,
1017 .suspend = siu_suspend, 1015 .suspend = siu_suspend,
1018 .resume = siu_resume, 1016 .resume = siu_resume,
1017 .driver = {
1018 .name = "SIU",
1019 },
1019}; 1020};
1020 1021
1021static int __devinit vr41xx_siu_init(void) 1022static int __devinit vr41xx_siu_init(void)
@@ -1026,7 +1027,7 @@ static int __devinit vr41xx_siu_init(void)
1026 if (IS_ERR(siu_platform_device)) 1027 if (IS_ERR(siu_platform_device))
1027 return PTR_ERR(siu_platform_device); 1028 return PTR_ERR(siu_platform_device);
1028 1029
1029 retval = driver_register(&siu_device_driver); 1030 retval = platform_driver_register(&siu_device_driver);
1030 if (retval < 0) 1031 if (retval < 0)
1031 platform_device_unregister(siu_platform_device); 1032 platform_device_unregister(siu_platform_device);
1032 1033
@@ -1035,7 +1036,7 @@ static int __devinit vr41xx_siu_init(void)
1035 1036
1036static void __devexit vr41xx_siu_exit(void) 1037static void __devexit vr41xx_siu_exit(void)
1037{ 1038{
1038 driver_unregister(&siu_device_driver); 1039 platform_driver_unregister(&siu_device_driver);
1039 1040
1040 platform_device_unregister(siu_platform_device); 1041 platform_device_unregister(siu_platform_device);
1041} 1042}