[POWERPC] powermac: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powermac platform & macintosh driver changes. Built for pmac32_defconfig, g5_defconfig Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
committed by
Paul Mackerras
parent
eeb2b723ef
commit
018a3d1db7
@@ -548,7 +548,7 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus)
|
||||
struct device_node *cc = NULL;
|
||||
struct device_node *p;
|
||||
const char *name = NULL;
|
||||
u32 *reg;
|
||||
const u32 *reg;
|
||||
int ok;
|
||||
|
||||
/* Look for the clock chip */
|
||||
@@ -562,7 +562,7 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus)
|
||||
pmac_tb_clock_chip_host = pmac_i2c_find_bus(cc);
|
||||
if (pmac_tb_clock_chip_host == NULL)
|
||||
continue;
|
||||
reg = (u32 *)get_property(cc, "reg", NULL);
|
||||
reg = get_property(cc, "reg", NULL);
|
||||
if (reg == NULL)
|
||||
continue;
|
||||
switch (*reg) {
|
||||
@@ -707,8 +707,7 @@ static void __init smp_core99_setup(int ncpus)
|
||||
core99_tb_gpio = KL_GPIO_TB_ENABLE; /* default value */
|
||||
cpu = of_find_node_by_type(NULL, "cpu");
|
||||
if (cpu != NULL) {
|
||||
tbprop = (u32 *)get_property(cpu, "timebase-enable",
|
||||
NULL);
|
||||
tbprop = get_property(cpu, "timebase-enable", NULL);
|
||||
if (tbprop)
|
||||
core99_tb_gpio = *tbprop;
|
||||
of_node_put(cpu);
|
||||
|
Reference in New Issue
Block a user