Skip to content

Commit

Permalink
[POWERPC] change get_property to return void *
Browse files Browse the repository at this point in the history
Change the get_property() function to return a void *. This allows us
to later remove the cast done in the majority of callers.

Built for pseries, iseries, pmac32, cell, cbesim, g5, systemsim, maple,
and mpc* defconfigs

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Jeremy Kerr authored and Paul Mackerras committed Jul 2, 2006

Unverified

No user is associated with the committer email.
1 parent 4ebd9ab commit a1af5b2
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
@@ -1975,8 +1975,7 @@ struct property *of_find_property(struct device_node *np, const char *name,
* Find a property with a given name for a given node
* and return the value.
*/
unsigned char *get_property(struct device_node *np, const char *name,
int *lenp)
void *get_property(struct device_node *np, const char *name, int *lenp)
{
struct property *pp = of_find_property(np,name,lenp);
return pp ? pp->value : NULL;
4 changes: 2 additions & 2 deletions include/asm-powerpc/prom.h
Original file line number Diff line number Diff line change
@@ -167,8 +167,8 @@ extern void unflatten_device_tree(void);
extern void early_init_devtree(void *);
extern int device_is_compatible(struct device_node *device, const char *);
extern int machine_is_compatible(const char *compat);
extern unsigned char *get_property(struct device_node *node, const char *name,
int *lenp);
extern void *get_property(struct device_node *node, const char *name,
int *lenp);
extern void print_properties(struct device_node *node);
extern int prom_n_addr_cells(struct device_node* np);
extern int prom_n_size_cells(struct device_node* np);

0 comments on commit a1af5b2

Please sign in to comment.