Commit 7dec0b46 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: hvc_console can only handle vty nodes compatible with...

[PATCH] ppc64: hvc_console can only handle vty nodes compatible with "hvterm1", from Hollis Blanchard

From: Anton Blanchard <anton@samba.org>

hvc_console can only handle vty nodes compatible with "hvterm1", from Hollis
Blanchard
parent 6a4f4509
...@@ -335,22 +335,22 @@ int hvc_put_chars(int index, const char *buf, int count) ...@@ -335,22 +335,22 @@ int hvc_put_chars(int index, const char *buf, int count)
* vterms */ * vterms */
int hvc_count(int *start_termno) int hvc_count(int *start_termno)
{ {
u32 *termno;
struct device_node *vty; struct device_node *vty;
int num_found = 0;
/* consider only the first vty node. /* consider only the first vty node.
* we should _always_ be able to find one. */ * we should _always_ be able to find one. */
vty = of_find_node_by_name(NULL, "vty"); vty = of_find_node_by_name(NULL, "vty");
if (vty) { if (vty && device_is_compatible(vty, "hvterm1")) {
if ((termno = (u32 *)get_property(vty, "reg", 0)) != NULL) { u32 *termno = (u32 *)get_property(vty, "reg", 0);
if (termno && start_termno)
*start_termno = *termno; *start_termno = *termno;
} num_found = 1;
of_node_put(vty); of_node_put(vty);
return 1; /* we can't support >1 with this interface */
} }
/* couldn't find any vterms */ return num_found;
return 0;
} }
long pSeries_lpar_hpte_insert(unsigned long hpte_group, long pSeries_lpar_hpte_insert(unsigned long hpte_group,
......
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