forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/tty/hvc/hvc_vio.c
....@@ -385,20 +385,11 @@
385385 void __init hvc_vio_init_early(void)
386386 {
387387 const __be32 *termno;
388
- const char *name;
389388 const struct hv_ops *ops;
390389
391390 /* 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
-
400391 /* Check if it's a virtual terminal */
401
- if (strncmp(name, "vty", 3) != 0)
392
+ if (!of_node_name_prefix(of_stdout, "vty"))
402393 return;
403394 termno = of_get_property(of_stdout, "reg", NULL);
404395 if (termno == NULL)