X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=arch%2Fsparc%2Fkernel%2Fprom.c;h=cd4fb79aa3a8e185f12d8bfcd8ec90960e2a40ff;hb=ce6754235b423610e91f5300e1555c2e4ee1c03a;hp=e3a537650db1e8792c0d7a7978b0e52ab3e7fe2e;hpb=f79e3185dd0f8650022518d7624c876d8929061b;p=linux-2.6-omap-h63xx.git diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c index e3a537650db..cd4fb79aa3a 100644 --- a/arch/sparc/kernel/prom.c +++ b/arch/sparc/kernel/prom.c @@ -102,6 +102,21 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len } EXPORT_SYMBOL(of_set_property); +int of_find_in_proplist(const char *list, const char *match, int len) +{ + while (len > 0) { + int l; + + if (!strcmp(list, match)) + return 1; + l = strlen(list) + 1; + list += l; + len -= l; + } + return 0; +} +EXPORT_SYMBOL(of_find_in_proplist); + static unsigned int prom_early_allocated; static void * __init prom_early_alloc(unsigned long size) @@ -415,7 +430,7 @@ static void __init of_console_init(void) unsigned long flags; const char *type; phandle node; - int skip, fd; + int skip, tmp, fd; of_console_path = prom_early_alloc(256); @@ -442,8 +457,9 @@ static void __init of_console_init(void) prom_halt(); } + tmp = skip; for_each_node_by_type(dp, type) { - if (!skip--) + if (!tmp--) break; } if (!dp) {