From patchwork Wed Aug 21 14:42:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19388 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E6191248E6 for ; Wed, 21 Aug 2013 14:44:10 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id bv4sf890001qab.0 for ; Wed, 21 Aug 2013 07:44:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=AacvxqkqVjqLmclHPyKE+Th4CiJAJT86Lo0pOR6LsIg=; b=C6Z9n/Zj8MDj+m1T6aURX3ibeZqWpn+jEIz++Zf/Ax/KV6Y7/jqO3M/Ebwls1EhW4N YARxSXPzQlB753WS7i1uQ1emhf9TzHYPzMBRVLsgQI8cqQcNlWCGK09v91p0WBx70bYL +Zke4c6y2clTlFlcN0gNwA3SjPoOR2vEujhvyWBWlC6O07LiWH1VUSzw9ASZmw5cKi13 p4Hzmoq/f/4jdtNJH3iUnzVZe9qzEqdZtqJbVVfqOH3uGtKWrr3g0Q8mCAwlmfFgs8wB ds5dnOtPWig10wM6qI3P8SdqUoSVVhtPH4TSwqkMOFu5RARI3n2sAnVCQIcejlDithid W5lg== X-Received: by 10.236.108.233 with SMTP id q69mr2836126yhg.11.1377096250604; Wed, 21 Aug 2013 07:44:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.110.195 with SMTP id ic3ls629023qeb.62.gmail; Wed, 21 Aug 2013 07:44:10 -0700 (PDT) X-Received: by 10.221.44.136 with SMTP id ug8mr6798370vcb.13.1377096250484; Wed, 21 Aug 2013 07:44:10 -0700 (PDT) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id gb9si2221936vdc.54.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:44:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id e12so366392vbg.15 for ; Wed, 21 Aug 2013 07:44:10 -0700 (PDT) X-Gm-Message-State: ALoCoQkdX4kwjTiNe1iW+iPMEIluHwOxJU0KqTHXCJapacBYedvbhWNFR6+JO1rzMr0NLQNQUwdf X-Received: by 10.58.54.70 with SMTP id h6mr233435vep.36.1377096250387; Wed, 21 Aug 2013 07:44:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp224616vcz; Wed, 21 Aug 2013 07:44:09 -0700 (PDT) X-Received: by 10.68.252.33 with SMTP id zp1mr87654pbc.95.1377096249401; Wed, 21 Aug 2013 07:44:09 -0700 (PDT) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by mx.google.com with ESMTPS id yo4si6685222pac.237.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:44:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.176 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.176; Received: by mail-pd0-f176.google.com with SMTP id q10so504647pdj.21 for ; Wed, 21 Aug 2013 07:44:09 -0700 (PDT) X-Received: by 10.66.219.68 with SMTP id pm4mr38623pac.161.1377096248978; Wed, 21 Aug 2013 07:44:08 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id os4sm8820403pbb.25.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:44:08 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar , Russell King Subject: [PATCH 12/14] cpufreq: sa11x0: use cpufreq_generic_init() routine Date: Wed, 21 Aug 2013 20:12:31 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use generic cpufreq_generic_init() routine instead of replicating the same code here. Cc: Russell King Signed-off-by: Viresh Kumar --- drivers/cpufreq/sa1100-cpufreq.c | 6 +----- drivers/cpufreq/sa1110-cpufreq.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/sa1100-cpufreq.c b/drivers/cpufreq/sa1100-cpufreq.c index a89c47b..623da74 100644 --- a/drivers/cpufreq/sa1100-cpufreq.c +++ b/drivers/cpufreq/sa1100-cpufreq.c @@ -197,11 +197,7 @@ static int sa1100_target(struct cpufreq_policy *policy, unsigned int ppcr) static int __init sa1100_cpu_init(struct cpufreq_policy *policy) { - if (policy->cpu != 0) - return -EINVAL; - policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; - - return cpufreq_table_validate_and_show(policy, sa11x0_freq_table); + return cpufreq_generic_init(policy, sa11x0_freq_table, CPUFREQ_ETERNAL); } static struct cpufreq_driver sa1100_driver __refdata = { diff --git a/drivers/cpufreq/sa1110-cpufreq.c b/drivers/cpufreq/sa1110-cpufreq.c index 0e52e80..2c2b2e6 100644 --- a/drivers/cpufreq/sa1110-cpufreq.c +++ b/drivers/cpufreq/sa1110-cpufreq.c @@ -306,11 +306,7 @@ static int sa1110_target(struct cpufreq_policy *policy, unsigned int ppcr) static int __init sa1110_cpu_init(struct cpufreq_policy *policy) { - if (policy->cpu != 0) - return -EINVAL; - policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; - - return cpufreq_table_validate_and_show(policy, sa11x0_freq_table); + return cpufreq_generic_init(policy, sa11x0_freq_table, CPUFREQ_ETERNAL); } /* sa1110_driver needs __refdata because it must remain after init registers