From patchwork Fri Sep 13 12:59:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20094 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B4A11202E6 for ; Fri, 13 Sep 2013 13:07:52 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf1185152vbg.8 for ; Fri, 13 Sep 2013 06:07:52 -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=mSd8YB8xrZEFgf/4pycWM3J4KGxxKs2M8QO61GF5lFE=; b=UdjJYqeEkeyGQGnZUXDAv4gvMpSQaY/+MwSlh9WQdDCKem38/3jfat6fB9K6rYXmzM wDkVEF93tUzlhNk1eyi6ZGdYG0+xv2efSPAV7PxlcY6v7wCVtJfH6xw2/1K0PO05Hn6u g/O5PM+5a2utoMyJGk/Ax3Qrv+eUZNvdmCbq8dUysEv6A12wekhgg2uKSrI4+uo1LsIM owoHaaKMYtF9q7qTPsWzgblc71e5CbaoO1jHh04veM6B/lcql9Tv+do2NWXq0DXLZ80n 9m+7LsTwI7bMH7gGwTB/Aq3uk0AAcCisW0uojDveoCet1iGMdI61n418V+IjFIG3hC08 XJFg== X-Gm-Message-State: ALoCoQnWEtChFe9e6QHGuUxZE2ko/FhBK8E8CCJj2EzdGK80cNk1dL/KATOGjlHVg6KT4IAeTlqT X-Received: by 10.236.14.100 with SMTP id c64mr5143867yhc.38.1379077672476; Fri, 13 Sep 2013 06:07:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.59.14 with SMTP id v14ls1160364qeq.87.gmail; Fri, 13 Sep 2013 06:07:52 -0700 (PDT) X-Received: by 10.52.100.202 with SMTP id fa10mr10091215vdb.0.1379077672222; Fri, 13 Sep 2013 06:07:52 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id c8si3085023vcq.138.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:07:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 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.170; Received: by mail-ve0-f170.google.com with SMTP id c14so969489vea.1 for ; Fri, 13 Sep 2013 06:07:52 -0700 (PDT) X-Received: by 10.52.110.98 with SMTP id hz2mr9190911vdb.1.1379077672140; Fri, 13 Sep 2013 06:07:52 -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 u4csp79679vcz; Fri, 13 Sep 2013 06:07:51 -0700 (PDT) X-Received: by 10.68.189.5 with SMTP id ge5mr13582691pbc.42.1379077666689; Fri, 13 Sep 2013 06:07:46 -0700 (PDT) Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by mx.google.com with ESMTPS id ua7si11176579pac.146.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:07:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.47 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.47; Received: by mail-pb0-f47.google.com with SMTP id rr4so1210607pbb.34 for ; Fri, 13 Sep 2013 06:07:46 -0700 (PDT) X-Received: by 10.66.161.138 with SMTP id xs10mr15482165pab.56.1379077666294; Fri, 13 Sep 2013 06:07:46 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ia5sm11642484pbc.42.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:07:45 -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 040/228] cpufreq: sc520: use cpufreq_table_validate_and_show() Date: Fri, 13 Sep 2013 18:29:46 +0530 Message-Id: <573c49b075362c50298d94412f035e3c7125b24a.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.128.170 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(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/sc520_freq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c index d6f6c6f..bb9c0de 100644 --- a/drivers/cpufreq/sc520_freq.c +++ b/drivers/cpufreq/sc520_freq.c @@ -106,7 +106,6 @@ static int sc520_freq_target(struct cpufreq_policy *policy, static int sc520_freq_cpu_init(struct cpufreq_policy *policy) { struct cpuinfo_x86 *c = &cpu_data(0); - int result; /* capability check */ if (c->x86_vendor != X86_VENDOR_AMD || @@ -117,13 +116,7 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 1000000; /* 1ms */ policy->cur = sc520_freq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, sc520_freq_table); - if (result) - return result; - - cpufreq_frequency_table_get_attr(sc520_freq_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, sc520_freq_table); }