From patchwork Wed Aug 21 14:42:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19378 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 591BF248E6 for ; Wed, 21 Aug 2013 14:42:57 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id o19sf884388qap.7 for ; Wed, 21 Aug 2013 07:42:57 -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=Sirqp81YEF8qWcL6bG3cstcax/SQuqIc1vlqYK9v4Gs=; b=f7lq7CyMUcYccUto/k4qh4k5YeOZlhcFkmzX0ezoXvNyAW9RCDjIpTZXfWj8paxfCh lD0whz6CDKigkGexbql/PxJ6OXWxBCrIg49Ex0+jqjgOAQy/kqt2n1shQR4ox0yqgMJI IMcQxts0H+spzn55wTDb0j6dcbUqLBwOQzQPSqOa4QreC7LztYipXknjE1BanvP63ffa 8ZTcOvxs6FmqqlcAkq1bUkCSFigVdaUCBIqcsDNoEktbH4/AUqDaHFmjBUex4C0bIvWD xFmXOnwPNZYdhLjdBihnwBi3PRb9mXmi9Ub1L+cdcB8zItrIdpywMLk/ODCUDPJlRw3u VGFA== X-Received: by 10.236.116.135 with SMTP id g7mr2692606yhh.53.1377096177192; Wed, 21 Aug 2013 07:42:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.231 with SMTP id n7ls662357qen.14.gmail; Wed, 21 Aug 2013 07:42:57 -0700 (PDT) X-Received: by 10.220.199.5 with SMTP id eq5mr6795530vcb.16.1377096177078; Wed, 21 Aug 2013 07:42:57 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id j6si2220488vet.55.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:42:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id ox1so431466veb.9 for ; Wed, 21 Aug 2013 07:42:57 -0700 (PDT) X-Gm-Message-State: ALoCoQmqwnBs7wjoBfU+o3gtqjUWV2vBUmFPOf+c3Y6faea69Kcn99mSawzl3pTQiC3ppdFL/G67 X-Received: by 10.220.206.195 with SMTP id fv3mr6759992vcb.15.1377096176988; Wed, 21 Aug 2013 07:42:56 -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 u4csp224527vcz; Wed, 21 Aug 2013 07:42:56 -0700 (PDT) X-Received: by 10.66.150.97 with SMTP id uh1mr72726pab.118.1377096176105; Wed, 21 Aug 2013 07:42:56 -0700 (PDT) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by mx.google.com with ESMTPS id mj9si3513855pab.306.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:42:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.172 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.172; Received: by mail-pd0-f172.google.com with SMTP id z10so501906pdj.31 for ; Wed, 21 Aug 2013 07:42:55 -0700 (PDT) X-Received: by 10.66.158.196 with SMTP id ww4mr9939808pab.57.1377096175693; Wed, 21 Aug 2013 07:42:55 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id eq5sm8834338pbc.15.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:42:55 -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 , Shawn Guo Subject: [PATCH 02/14] cpufreq: cpu0: use cpufreq_generic_init() routine Date: Wed, 21 Aug 2013 20:12:21 +0530 Message-Id: <17350be8e0162f459f94400195186496af841de5.1377093938.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.128.178 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: Shawn Guo Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-cpu0.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index ddd9010..7273bfc 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -99,24 +99,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy, unsigned int index) static int cpu0_cpufreq_init(struct cpufreq_policy *policy) { - int ret; - - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - pr_err("invalid frequency table: %d\n", ret); - return ret; - } - - policy->cpuinfo.transition_latency = transition_latency; - - /* - * The driver only supports the SMP configuartion where all processors - * share the clock and voltage and clock. Use cpufreq affected_cpus - * interface to have all CPUs scaled together. - */ - cpumask_setall(policy->cpus); - - return 0; + return cpufreq_generic_init(policy, freq_table, transition_latency); } static struct cpufreq_driver cpu0_cpufreq_driver = {