mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
sunsu: Fix detection of SU ports which are RSC console or control.
These device nodes are named "rsc-console" and "rsc-control" rather than 'serial', but the device_type property is 'serial' so we'll tip off of that for detection. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4e68e18841
commit
8301d386af
1 changed files with 10 additions and 0 deletions
|
@ -1517,6 +1517,10 @@ static const struct of_device_id su_match[] = {
|
||||||
.name = "serial",
|
.name = "serial",
|
||||||
.compatible = "su",
|
.compatible = "su",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.type = "serial",
|
||||||
|
.compatible = "su",
|
||||||
|
},
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, su_match);
|
MODULE_DEVICE_TABLE(of, su_match);
|
||||||
|
@ -1548,6 +1552,12 @@ static int __init sunsu_init(void)
|
||||||
num_uart++;
|
num_uart++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for_each_node_by_type(dp, "serial") {
|
||||||
|
if (of_device_is_compatible(dp, "su")) {
|
||||||
|
if (su_get_type(dp) == SU_PORT_PORT)
|
||||||
|
num_uart++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (num_uart) {
|
if (num_uart) {
|
||||||
err = sunserial_register_minors(&sunsu_reg, num_uart);
|
err = sunserial_register_minors(&sunsu_reg, num_uart);
|
||||||
|
|
Loading…
Reference in a new issue