Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c1a2bae0cc52b21121ea2380a2db0294ad0d8e7
Commit:     9c1a2bae0cc52b21121ea2380a2db0294ad0d8e7
Parent:     d05c7a80cf39ae7d0f8d0c3e47c93d51fcd393d3
Author:     Stephen Rothwell <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 3 22:50:59 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Apr 13 03:55:19 2007 +1000

    [POWERPC] Rename get_property to of_get_property: the last one
    
    This also fixes a bug where a property value was being modified
    in place.
    
    Signed-off-by: Stephen Rothwell <[EMAIL PROTECTED]>
    Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/cbe_cpufreq.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq.c 
b/arch/powerpc/platforms/cell/cbe_cpufreq.c
index a3850fd..9c5d63b 100644
--- a/arch/powerpc/platforms/cell/cbe_cpufreq.c
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq.c
@@ -126,7 +126,8 @@ static int set_pmode(int cpu, unsigned int pmode)
 
 static int cbe_cpufreq_cpu_init (struct cpufreq_policy *policy)
 {
-       u32 *max_freq;
+       const u32 *max_freqp;
+       u32 max_freq;
        int i, cur_pmode;
        struct device_node *cpu;
 
@@ -137,20 +138,20 @@ static int cbe_cpufreq_cpu_init (struct cpufreq_policy 
*policy)
 
        pr_debug("init cpufreq on CPU %d\n", policy->cpu);
 
-       max_freq = (u32*) get_property(cpu, "clock-frequency", NULL);
+       max_freqp = of_get_property(cpu, "clock-frequency", NULL);
 
-       if(!max_freq)
+       if (!max_freqp)
                return -EINVAL;
 
        // we need the freq in kHz
-       *max_freq /= 1000;
+       max_freq = *max_freqp / 1000;
 
-       pr_debug("max clock-frequency is at %u kHz\n", *max_freq);
+       pr_debug("max clock-frequency is at %u kHz\n", max_freq);
        pr_debug("initializing frequency table\n");
 
        // initialize frequency table
        for (i=0; cbe_freqs[i].frequency!=CPUFREQ_TABLE_END; i++) {
-               cbe_freqs[i].frequency = *max_freq / cbe_freqs[i].index;
+               cbe_freqs[i].frequency = max_freq / cbe_freqs[i].index;
                pr_debug("%d: %d\n", i, cbe_freqs[i].frequency);
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to