From patchwork Fri Sep 13 12:59: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: 20079 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 97ADB202E6 for ; Fri, 13 Sep 2013 13:06:04 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id a11sf1211363qen.2 for ; Fri, 13 Sep 2013 06:06:04 -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=pYeC367BR3VpniJxdAKJkHhg+C2vwiTuWlwfdrx2Ros=; b=DJ6fznSahKHbUOhAwaTfyc05giZvqynAtNMbVJKMg9eOKCtkqm/sVz1nES1wOY1quc 81QdAmgEho4PY6o/P14xJk6NhGNIPUpKWtNF0WsAnAlY5yGXEPJJqt0lL7RUJdPSZfxp Z72OV7KMgruDlXdXE5v6vQmInsKk5/FEOn92rvfMXaPzoo8eBAQrN79P5LWVB0rQrNtJ 0HhqJlIglQ8qpCBo4Mz3AVaYQHV0UWS4/Ce9DIEyzquJyk0sGXu7I1ih6mWO7pO3GILL gzWhXEldnw1IHqeAtzqGZ0Jfixmaj6Ep1CYduk7APCaGVPvk09SYul7cdjXDTqDsVn+U cuyw== X-Gm-Message-State: ALoCoQlEv6u2sZb8kbxziYAV9cu433GLu9iDZ7DHGp7lz0g8XoAWMN6ilNlQQzgSxMFj6s/4jzOP X-Received: by 10.236.56.70 with SMTP id l46mr5336380yhc.2.1379077564432; Fri, 13 Sep 2013 06:06:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.104.198 with SMTP id gg6ls1152712qeb.89.gmail; Fri, 13 Sep 2013 06:06:04 -0700 (PDT) X-Received: by 10.52.114.231 with SMTP id jj7mr10162338vdb.2.1379077564152; Fri, 13 Sep 2013 06:06:04 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id ya5si3109872vec.19.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:06:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 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.175; Received: by mail-vc0-f175.google.com with SMTP id ia10so887053vcb.6 for ; Fri, 13 Sep 2013 06:06:04 -0700 (PDT) X-Received: by 10.52.108.230 with SMTP id hn6mr1546993vdb.28.1379077564068; Fri, 13 Sep 2013 06:06:04 -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 u4csp79559vcz; Fri, 13 Sep 2013 06:06:03 -0700 (PDT) X-Received: by 10.68.9.3 with SMTP id v3mr13206672pba.84.1379077562701; Fri, 13 Sep 2013 06:06:02 -0700 (PDT) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by mx.google.com with ESMTPS id xx2si11125686pac.285.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:06:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.174 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.174; Received: by mail-pd0-f174.google.com with SMTP id y13so1230830pdi.33 for ; Fri, 13 Sep 2013 06:06:02 -0700 (PDT) X-Received: by 10.67.2.4 with SMTP id bk4mr15242338pad.78.1379077561982; Fri, 13 Sep 2013 06:06:01 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id sz3sm11675031pbc.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:06:01 -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 025/228] cpufreq: kirkwood: use cpufreq_table_validate_and_show() Date: Fri, 13 Sep 2013 18:29: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.220.175 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(). Reviewed-by: Andrew Lunn Signed-off-by: Viresh Kumar --- 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 ba10658..59cbb35 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)