diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-07-17 11:05:52 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 17:23:13 (GMT) |
commit | bce9451310eb66fbbd77bf22e8160079700691f8 (patch) | |
tree | d054902d208c904784d1e5d29957acd6627e153d /arch/powerpc/platforms/cell/spu_manage.c | |
parent | cca9a6cc580b504a2575d505ab072ebf0872e016 (diff) | |
download | linux-fsl-qoriq-bce9451310eb66fbbd77bf22e8160079700691f8.tar.xz |
Cell: Draw SPE helper penguin logos
Let spu_management_ops.enumerate_spus() return the number of found SPEs
and use that information to draw some little helper penguin logos.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-By: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spu_manage.c')
-rw-r--r-- | arch/powerpc/platforms/cell/spu_manage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 1d4562a..75ed50f 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c @@ -279,6 +279,7 @@ static int __init of_enumerate_spus(int (*fn)(void *data)) { int ret; struct device_node *node; + unsigned int n = 0; ret = -ENODEV; for (node = of_find_node_by_type(NULL, "spe"); @@ -289,8 +290,9 @@ static int __init of_enumerate_spus(int (*fn)(void *data)) __FUNCTION__, node->name); break; } + n++; } - return ret; + return ret ? ret : n; } static int __init of_create_spu(struct spu *spu, void *data) |