diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-29 02:29:08 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-29 21:02:05 -0400 |
commit | 12d371a69e6df96cd949af6bcb569e978e8f9d41 (patch) | |
tree | 30ed043c2d262b1bf25cbc0a1e19111dc7ac407e /arch/powerpc/platforms/pasemi | |
parent | 8d1cea6e1439a113b1f17eab9b4e2f0cfc24bbb0 (diff) |
[POWERPC] get_property cleanups
Just another pass through arch/powerpc for old usages.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pasemi')
-rw-r--r-- | arch/powerpc/platforms/pasemi/cpufreq.c | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/gpio_mdio.c | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c index 4dd5c512f869..2a57d6023685 100644 --- a/arch/powerpc/platforms/pasemi/cpufreq.c +++ b/arch/powerpc/platforms/pasemi/cpufreq.c | |||
@@ -134,7 +134,8 @@ void restore_astate(int cpu) | |||
134 | 134 | ||
135 | static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) | 135 | static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) |
136 | { | 136 | { |
137 | u32 *max_freq; | 137 | const u32 *max_freqp; |
138 | u32 max_freq; | ||
138 | int i, cur_astate; | 139 | int i, cur_astate; |
139 | struct resource res; | 140 | struct resource res; |
140 | struct device_node *cpu, *dn; | 141 | struct device_node *cpu, *dn; |
@@ -175,16 +176,16 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
175 | 176 | ||
176 | pr_debug("init cpufreq on CPU %d\n", policy->cpu); | 177 | pr_debug("init cpufreq on CPU %d\n", policy->cpu); |
177 | 178 | ||
178 | max_freq = (u32*) get_property(cpu, "clock-frequency", NULL); | 179 | max_freqp = of_get_property(cpu, "clock-frequency", NULL); |
179 | if (!max_freq) { | 180 | if (!max_freqp) { |
180 | err = -EINVAL; | 181 | err = -EINVAL; |
181 | goto out_unmap_sdcpwr; | 182 | goto out_unmap_sdcpwr; |
182 | } | 183 | } |
183 | 184 | ||
184 | /* we need the freq in kHz */ | 185 | /* we need the freq in kHz */ |
185 | *max_freq /= 1000; | 186 | max_freq = *max_freqp / 1000; |
186 | 187 | ||
187 | pr_debug("max clock-frequency is at %u kHz\n", *max_freq); | 188 | pr_debug("max clock-frequency is at %u kHz\n", max_freq); |
188 | pr_debug("initializing frequency table\n"); | 189 | pr_debug("initializing frequency table\n"); |
189 | 190 | ||
190 | /* initialize frequency table */ | 191 | /* initialize frequency table */ |
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c index b1d3b6b420ae..c91a33593bb8 100644 --- a/arch/powerpc/platforms/pasemi/gpio_mdio.c +++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c | |||
@@ -258,7 +258,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev, | |||
258 | new_bus->write = &gpio_mdio_write, | 258 | new_bus->write = &gpio_mdio_write, |
259 | new_bus->reset = &gpio_mdio_reset, | 259 | new_bus->reset = &gpio_mdio_reset, |
260 | 260 | ||
261 | prop = get_property(np, "reg", NULL); | 261 | prop = of_get_property(np, "reg", NULL); |
262 | new_bus->id = *prop; | 262 | new_bus->id = *prop; |
263 | new_bus->priv = priv; | 263 | new_bus->priv = priv; |
264 | 264 | ||
@@ -269,10 +269,10 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev, | |||
269 | new_bus->irq[i] = irq_create_mapping(NULL, 10); | 269 | new_bus->irq[i] = irq_create_mapping(NULL, 10); |
270 | 270 | ||
271 | 271 | ||
272 | prop = get_property(np, "mdc-pin", NULL); | 272 | prop = of_get_property(np, "mdc-pin", NULL); |
273 | priv->mdc_pin = *prop; | 273 | priv->mdc_pin = *prop; |
274 | 274 | ||
275 | prop = get_property(np, "mdio-pin", NULL); | 275 | prop = of_get_property(np, "mdio-pin", NULL); |
276 | priv->mdio_pin = *prop; | 276 | priv->mdio_pin = *prop; |
277 | 277 | ||
278 | new_bus->dev = dev; | 278 | new_bus->dev = dev; |