lkml.org 
[lkml]   [2013]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 103/228] cpufreq: gx: don't initialize part of policy that is set by core too
    Date
    Many common initializations of struct policy are moved to core now and hence
    this driver doesn't need to do it. This patch removes such code.

    Most recent of those changes is to call ->get() in the core after calling
    ->init().

    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
    ---
    drivers/cpufreq/gx-suspmod.c | 5 +----
    1 file changed, 1 insertion(+), 4 deletions(-)

    diff --git a/drivers/cpufreq/gx-suspmod.c b/drivers/cpufreq/gx-suspmod.c
    index 70442c7..d83e826 100644
    --- a/drivers/cpufreq/gx-suspmod.c
    +++ b/drivers/cpufreq/gx-suspmod.c
    @@ -401,7 +401,7 @@ static int cpufreq_gx_target(struct cpufreq_policy *policy,

    static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
    {
    - unsigned int maxfreq, curfreq;
    + unsigned int maxfreq;

    if (!policy || policy->cpu != 0)
    return -ENODEV;
    @@ -415,10 +415,8 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
    maxfreq = 30000 * gx_freq_mult[getCx86(CX86_DIR1) & 0x0f];

    stock_freq = maxfreq;
    - curfreq = gx_get_cpuspeed(0);

    pr_debug("cpu max frequency is %d.\n", maxfreq);
    - pr_debug("cpu current frequency is %dkHz.\n", curfreq);

    /* setup basic struct for cpufreq API */
    policy->cpu = 0;
    @@ -428,7 +426,6 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
    else
    policy->min = maxfreq / POLICY_MIN_DIV;
    policy->max = maxfreq;
    - policy->cur = curfreq;
    policy->cpuinfo.min_freq = maxfreq / max_duration;
    policy->cpuinfo.max_freq = maxfreq;
    policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
    --
    1.7.12.rc2.18.g61b472e


    \
     
     \ /
      Last update: 2013-09-13 16:01    [W:2.202 / U:0.372 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site