Skip to content

Commit

Permalink
powerpc: Convert sysfs cache code to of_find_next_cache_node()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
  • Loading branch information
nathanlynch authored and paulusmack committed Dec 21, 2008
1 parent b2ea25b commit 13ba3c0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions arch/powerpc/kernel/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 13ba3c0

Please sign in to comment.