aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sunsab.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-07-17 19:40:26 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-07-21 17:18:01 -0400
commitbda2f7b4801964351253706d1a87e4d2110829a5 (patch)
treec9da15652f91efb4ba0932d407200aa4d718d6aa /drivers/serial/sunsab.c
parent44f2650b134b423128063ded29a11454b924390e (diff)
[SERIAL] sunsab: Get line numbers and table sizing correct.
Table sizing code should look for "se" not "su" nodes. The chip at the lower address should get the first index. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/serial/sunsab.c')
-rw-r--r--drivers/serial/sunsab.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index cb55d81c27d..dc673e1b6fd 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -1047,12 +1047,13 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
1047 up = &sunsab_ports[inst * 2]; 1047 up = &sunsab_ports[inst * 2];
1048 1048
1049 err = sunsab_init_one(&up[0], op, 1049 err = sunsab_init_one(&up[0], op,
1050 sizeof(union sab82532_async_regs), 1050 0,
1051 (inst * 2) + 0); 1051 (inst * 2) + 0);
1052 if (err) 1052 if (err)
1053 return err; 1053 return err;
1054 1054
1055 err = sunsab_init_one(&up[1], op, 0, 1055 err = sunsab_init_one(&up[1], op,
1056 sizeof(union sab82532_async_regs),
1056 (inst * 2) + 1); 1057 (inst * 2) + 1);
1057 if (err) { 1058 if (err) {
1058 of_iounmap(up[0].port.membase, 1059 of_iounmap(up[0].port.membase,
@@ -1061,8 +1062,8 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
1061 return err; 1062 return err;
1062 } 1063 }
1063 1064
1064 uart_add_one_port(&sunsab_reg, &up[1].port);
1065 uart_add_one_port(&sunsab_reg, &up[0].port); 1065 uart_add_one_port(&sunsab_reg, &up[0].port);
1066 uart_add_one_port(&sunsab_reg, &up[1].port);
1066 1067
1067 dev_set_drvdata(&op->dev, &up[0]); 1068 dev_set_drvdata(&op->dev, &up[0]);
1068 1069
@@ -1117,7 +1118,7 @@ static int __init sunsab_init(void)
1117 int err; 1118 int err;
1118 1119
1119 num_channels = 0; 1120 num_channels = 0;
1120 for_each_node_by_name(dp, "su") 1121 for_each_node_by_name(dp, "se")
1121 num_channels += 2; 1122 num_channels += 2;
1122 for_each_node_by_name(dp, "serial") { 1123 for_each_node_by_name(dp, "serial") {
1123 if (of_device_is_compatible(dp, "sab82532")) 1124 if (of_device_is_compatible(dp, "sab82532"))