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>
This commit is contained in:
committed by
Paul Mackerras
parent
b2ea25b958
commit
13ba3c0092
@@ -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)
|
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 device_node *next_cache;
|
||||||
struct cache_desc *new, **end;
|
struct cache_desc *new, **end;
|
||||||
|
|
||||||
@@ -591,11 +590,7 @@ static struct cache_desc * __cpuinit create_cache_index_info(struct device_node
|
|||||||
while (*end)
|
while (*end)
|
||||||
end = &(*end)->next;
|
end = &(*end)->next;
|
||||||
|
|
||||||
next_cache_phandle = of_get_property(np, "l2-cache", NULL);
|
next_cache = of_find_next_cache_node(np);
|
||||||
if (!next_cache_phandle)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
next_cache = of_find_node_by_phandle(*next_cache_phandle);
|
|
||||||
if (!next_cache)
|
if (!next_cache)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user