Commit bda2f7b4 authored by David S. Miller's avatar David S. Miller

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent 44f2650b
...@@ -1047,12 +1047,13 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * ...@@ -1047,12 +1047,13 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
up = &sunsab_ports[inst * 2]; up = &sunsab_ports[inst * 2];
err = sunsab_init_one(&up[0], op, err = sunsab_init_one(&up[0], op,
sizeof(union sab82532_async_regs), 0,
(inst * 2) + 0); (inst * 2) + 0);
if (err) if (err)
return err; return err;
err = sunsab_init_one(&up[1], op, 0, err = sunsab_init_one(&up[1], op,
sizeof(union sab82532_async_regs),
(inst * 2) + 1); (inst * 2) + 1);
if (err) { if (err) {
of_iounmap(up[0].port.membase, 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,8 +1062,8 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
return err; return err;
} }
uart_add_one_port(&sunsab_reg, &up[1].port);
uart_add_one_port(&sunsab_reg, &up[0].port); uart_add_one_port(&sunsab_reg, &up[0].port);
uart_add_one_port(&sunsab_reg, &up[1].port);
dev_set_drvdata(&op->dev, &up[0]); dev_set_drvdata(&op->dev, &up[0]);
...@@ -1117,7 +1118,7 @@ static int __init sunsab_init(void) ...@@ -1117,7 +1118,7 @@ static int __init sunsab_init(void)
int err; int err;
num_channels = 0; num_channels = 0;
for_each_node_by_name(dp, "su") for_each_node_by_name(dp, "se")
num_channels += 2; num_channels += 2;
for_each_node_by_name(dp, "serial") { for_each_node_by_name(dp, "serial") {
if (of_device_is_compatible(dp, "sab82532")) if (of_device_is_compatible(dp, "sab82532"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment