From patchwork Fri Sep 13 13:01:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20198 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B7A3620358 for ; Fri, 13 Sep 2013 13:20:02 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l4sf1165197yen.2 for ; Fri, 13 Sep 2013 06:20:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=A2ZrSwniAjhL9EC0rx6mIhpjEQumj61BpuMwKgjYu5M=; b=j7bYMQvrYGDUpYnJDXCqYTNxzECUf4vkMf9hHy5Z0S24rHy+5BC07Y+BGp9ec6jV98 STtiT9D1wBB9XrTkX335dZkMlFEu9j93ynBC945jm3DWsw73cjBL6bzj6ggUyqGjWv+i kfDBZLYFaM4DudOfKx36G3STUiA05RP7bUZ2RcQZfRYyvDdTTtwzIuQAQP7WfGD9qMFe ceLzFDfVOhaxVWzhklDn9jOg0rohu/KOvdAI1Jbchc1EgS2gnV1wRCRS08UNEZDVjlcd leu9wBD3yQmEMoKw60XAGZ1xXjh6HPpLrFB9Fdw6MR0QXHhbDr31/PEG340MS+aGHpS0 F6xw== X-Gm-Message-State: ALoCoQmMJFrWqBz9q521S0JlnYoQK+2zlxZTfndW0VNUeb7eg/pvJD6J3d6tpYzWE9CmpsU4xO5L X-Received: by 10.236.94.205 with SMTP id n53mr5020372yhf.44.1379078402515; Fri, 13 Sep 2013 06:20:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.119.9 with SMTP id kq9ls1159124qeb.48.gmail; Fri, 13 Sep 2013 06:20:02 -0700 (PDT) X-Received: by 10.221.44.136 with SMTP id ug8mr11969136vcb.13.1379078402297; Fri, 13 Sep 2013 06:20:02 -0700 (PDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id op1si3105420vcb.117.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:20:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.53 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.53; Received: by mail-vb0-f53.google.com with SMTP id i3so883607vbh.26 for ; Fri, 13 Sep 2013 06:20:02 -0700 (PDT) X-Received: by 10.220.10.194 with SMTP id q2mr11847497vcq.2.1379078402232; Fri, 13 Sep 2013 06:20:02 -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 u4csp80309vcz; Fri, 13 Sep 2013 06:20:01 -0700 (PDT) X-Received: by 10.66.219.41 with SMTP id pl9mr1644522pac.187.1379078401272; Fri, 13 Sep 2013 06:20:01 -0700 (PDT) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by mx.google.com with ESMTPS id jx3si7441600pbc.204.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:20:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.171 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.171; Received: by mail-pd0-f171.google.com with SMTP id g10so1227437pdj.30 for ; Fri, 13 Sep 2013 06:20:00 -0700 (PDT) X-Received: by 10.68.33.100 with SMTP id q4mr6030607pbi.119.1379078400842; Fri, 13 Sep 2013 06:20:00 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id tz3sm11734072pbc.20.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:20:00 -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, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 144/228] cpufreq: sa11x0: use cpufreq_generic_init() routine Date: Fri, 13 Sep 2013 18:31:30 +0530 Message-Id: <254e7e912c3817fdf1499bb1ea7be7bc7f3cdbef.1379063063.git.viresh.kumar@linaro.org> 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.53 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. Signed-off-by: Viresh Kumar Acked-by: Russell King --- 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 a1d1bb7..b282cea 100644 --- a/drivers/cpufreq/sa1100-cpufreq.c +++ b/drivers/cpufreq/sa1100-cpufreq.c @@ -218,11 +218,7 @@ static int sa1100_target(struct cpufreq_policy *policy, 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 9da940e..bca04c0 100644 --- a/drivers/cpufreq/sa1110-cpufreq.c +++ b/drivers/cpufreq/sa1110-cpufreq.c @@ -332,11 +332,7 @@ static int sa1110_target(struct cpufreq_policy *policy, 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