[SPARC]: Simplify and correct __cpu_find_by()

By using for_each_node_by_type().

Also, correct a spurioud test in check_cpu_node() on sparc64.
It is only called with nodes that have device_type "cpu".

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2006-07-17 21:49:58 -07:00
parent 2f72ba4358
commit c2d3bffebc
2 changed files with 7 additions and 21 deletions

View File

@@ -66,9 +66,6 @@ static int check_cpu_node(struct device_node *dp, int *cur_inst,
void *compare_arg,
struct device_node **dev_node, int *mid)
{
if (strcmp(dp->type, "cpu"))
return -ENODEV;
if (!compare(dp, *cur_inst, compare_arg)) {
if (dev_node)
*dev_node = dp;