| .. | .. |
|---|
| 385 | 385 | void __init hvc_vio_init_early(void) |
|---|
| 386 | 386 | { |
|---|
| 387 | 387 | const __be32 *termno; |
|---|
| 388 | | - const char *name; |
|---|
| 389 | 388 | const struct hv_ops *ops; |
|---|
| 390 | 389 | |
|---|
| 391 | 390 | /* find the boot console from /chosen/stdout */ |
|---|
| 392 | | - if (!of_stdout) |
|---|
| 393 | | - return; |
|---|
| 394 | | - name = of_get_property(of_stdout, "name", NULL); |
|---|
| 395 | | - if (!name) { |
|---|
| 396 | | - printk(KERN_WARNING "stdout node missing 'name' property!\n"); |
|---|
| 397 | | - return; |
|---|
| 398 | | - } |
|---|
| 399 | | - |
|---|
| 400 | 391 | /* Check if it's a virtual terminal */ |
|---|
| 401 | | - if (strncmp(name, "vty", 3) != 0) |
|---|
| 392 | + if (!of_node_name_prefix(of_stdout, "vty")) |
|---|
| 402 | 393 | return; |
|---|
| 403 | 394 | termno = of_get_property(of_stdout, "reg", NULL); |
|---|
| 404 | 395 | if (termno == NULL) |
|---|