From patchwork Thu Aug 8 13:48:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18866 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f197.google.com (mail-gh0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 58132246A4 for ; Thu, 8 Aug 2013 13:50:59 +0000 (UTC) Received: by mail-gh0-f197.google.com with SMTP id r20sf2473296ghr.0 for ; Thu, 08 Aug 2013 06:50:59 -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=RZ+r1XpVuMLrXT8RRrSpuPD4tUOeZYp4guSwo5kLkso=; b=hJF3WMK82Ws/nwzeBvcRa+t2CQf8cjdJR95XeWxzyZv80dMAH4BrvOZ2b7htFe3ri1 S921rbwZCaurmXP2ijGOfuPg8Yxn3HFn72okfObDB2cZN5vq0MIiTHuxue2DbTZOTS/F 5rAI9jLFxeVNc5oswgOsIzW6knV+trS36rhZwlUWXfBE2asQ5iPqKIi3mlSrV+01PtW7 0bCNnghz5+D4wjpJmFfAen2OVYWCMGR7ZT7CRz/r+P7sXLVEnffTPW1SY1ZQ1674Kdl5 NBhAzqv1rsxKTHsES7bcSHIr8WFzv75n51PB66nx/JIZhrjiZ/4t6pIuljdgtxkKnMrx Vs4g== X-Received: by 10.236.117.11 with SMTP id i11mr3291414yhh.16.1375969859033; Thu, 08 Aug 2013 06:50:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.233 with SMTP id x9ls1034455qef.46.gmail; Thu, 08 Aug 2013 06:50:58 -0700 (PDT) X-Received: by 10.58.76.74 with SMTP id i10mr1702412vew.13.1375969858931; Thu, 08 Aug 2013 06:50:58 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id s17si3093930vcu.89.2013.08.08.06.50.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id id13so120191vcb.32 for ; Thu, 08 Aug 2013 06:50:58 -0700 (PDT) X-Gm-Message-State: ALoCoQkVgejO7xLrSjfbcxZGMB5DsaZWmJSDBnwgzzcAX/M7dKZ3ir688krQLpE6/3RY5yrT/6Dj X-Received: by 10.221.47.193 with SMTP id ut1mr4005320vcb.8.1375969858860; Thu, 08 Aug 2013 06:50:58 -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 u4csp16789vcz; Thu, 8 Aug 2013 06:50:58 -0700 (PDT) X-Received: by 10.66.122.67 with SMTP id lq3mr6191446pab.147.1375969857958; Thu, 08 Aug 2013 06:50:57 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id yt8si7890059pab.293.2013.08.08.06.50.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.50; Received: by mail-pb0-f50.google.com with SMTP id uo5so3257378pbc.37 for ; Thu, 08 Aug 2013 06:50:57 -0700 (PDT) X-Received: by 10.68.196.37 with SMTP id ij5mr6113454pbc.175.1375969857567; Thu, 08 Aug 2013 06:50:57 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ss8sm16716069pab.6.2013.08.08.06.50.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:56 -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 , Andrew Lunn Subject: [PATCH 17/35] cpufreq: kirkwood: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:19 +0530 Message-Id: <8b7f30f52b99c21697168d77f1fae298dad50226.1375964117.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.220.173 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: , Lets use cpufreq_table_validate_and_show() instead of calling cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr(). Cc: Andrew Lunn Signed-off-by: Viresh Kumar Reviewed-by: Andrew Lunn --- drivers/cpufreq/kirkwood-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c index 45e4d7f..336f171 100644 --- a/drivers/cpufreq/kirkwood-cpufreq.c +++ b/drivers/cpufreq/kirkwood-cpufreq.c @@ -125,19 +125,11 @@ static int kirkwood_cpufreq_target(struct cpufreq_policy *policy, /* Module init and exit code */ static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy) { - int result; - /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 5000; /* 5uS */ policy->cur = kirkwood_cpufreq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, kirkwood_freq_table); - if (result) - return result; - - cpufreq_frequency_table_get_attr(kirkwood_freq_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, kirkwood_freq_table); } static int kirkwood_cpufreq_cpu_exit(struct cpufreq_policy *policy)