summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2008-12-10 15:46:06 +0100
committerPaul Mackerras <paulus@samba.org>2008-12-21 04:21:14 +0100
commit13ba3c0092b4db272d1f643206c1b55f4fe415a6 (patch)
tree0d583fc57b0820bba6f678974dbc4c09e1d636aa /arch
parentpowerpc: Convert cpu_to_l2cache() to of_find_next_cache_node() (diff)
downloadlinux-13ba3c0092b4db272d1f643206c1b55f4fe415a6.tar.xz
linux-13ba3c0092b4db272d1f643206c1b55f4fe415a6.zip
powerpc: Convert sysfs cache code to of_find_next_cache_node()
Using the common code means that more complete cache information will provided in sysfs on platforms that don't use the l2-cache property convention. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/sysfs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 20885a38237a..0c64f10087b9 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -566,7 +566,6 @@ static bool cache_is_unified(struct device_node *np)
static struct cache_desc * __cpuinit create_cache_index_info(struct device_node *np, struct kobject *parent, int index, int level)
{
- const phandle *next_cache_phandle;
struct device_node *next_cache;
struct cache_desc *new, **end;
@@ -591,11 +590,7 @@ static struct cache_desc * __cpuinit create_cache_index_info(struct device_node
while (*end)
end = &(*end)->next;
- next_cache_phandle = of_get_property(np, "l2-cache", NULL);
- if (!next_cache_phandle)
- goto out;
-
- next_cache = of_find_node_by_phandle(*next_cache_phandle);
+ next_cache = of_find_next_cache_node(np);
if (!next_cache)
goto out;