From patchwork Thu Aug 8 13:48:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18862 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CD43246A4 for ; Thu, 8 Aug 2013 13:50:30 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id a11sf1190900qcx.5 for ; Thu, 08 Aug 2013 06:50:30 -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=4pa7J5uHccb0aldwUPcVSDLSTKB8nPFt7/hYVHqcYdo=; b=RyPeL1ZGiRbrCoqquq0yCedowh6zgUAMXmCrE/v5ggH3csx2uOyK9NhxRAUpiC5wGp /y6vzIPJrK/ZdeH8d4CRJ3QhDU0DTmfpaqtJIDEah1QPhJVhERfZlhoFWcoce24FpYs2 whxb0P/vCaQKtDGj1TGIY4RBUiq9e7UF1H2qKea5jYAkEjBP5eg/nPdcNaiQj2cVUKX/ lqhyeaRV3veXsPoYNwGkE0bzNqc10njhm4gHjQ9oKkn8FQ4uNPQOboSUUbGRSnEyY2Ih pWfHP44162n26F2gzOrKoOlKLkK+iNdmYyGmZQExhCp6o82IEEaUfDppD1VeZwcrNQ// XyeA== X-Received: by 10.236.148.33 with SMTP id u21mr3153498yhj.37.1375969829835; Thu, 08 Aug 2013 06:50:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.26.70 with SMTP id j6ls1107391qeg.94.gmail; Thu, 08 Aug 2013 06:50:29 -0700 (PDT) X-Received: by 10.58.154.34 with SMTP id vl2mr3194176veb.35.1375969829742; Thu, 08 Aug 2013 06:50:29 -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 sd9si3097600vdc.13.2013.08.08.06.50.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:29 -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 15so3108787vea.29 for ; Thu, 08 Aug 2013 06:50:29 -0700 (PDT) X-Gm-Message-State: ALoCoQnngQgGndRccvcJ3R6EerlkrUpT/qd1PfldepiemBNmXR9sFVYu7YQSPv35I2FE+3fd80FR X-Received: by 10.220.50.10 with SMTP id x10mr2135202vcf.86.1375969829660; Thu, 08 Aug 2013 06:50:29 -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 u4csp16761vcz; Thu, 8 Aug 2013 06:50:29 -0700 (PDT) X-Received: by 10.66.188.203 with SMTP id gc11mr6131895pac.63.1375969828816; Thu, 08 Aug 2013 06:50:28 -0700 (PDT) Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by mx.google.com with ESMTPS id dw1si8634886pbc.96.2013.08.08.06.50.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.49 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.49; Received: by mail-pb0-f49.google.com with SMTP id xb4so3227205pbc.36 for ; Thu, 08 Aug 2013 06:50:28 -0700 (PDT) X-Received: by 10.68.27.37 with SMTP id q5mr6181427pbg.145.1375969828385; Thu, 08 Aug 2013 06:50:28 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id lm2sm16721024pab.2.2013.08.08.06.50.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:27 -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 13/35] cpufreq: elanfreq: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:15 +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.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/elanfreq.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index 823a400..4000c34 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c @@ -202,7 +202,6 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) { struct cpuinfo_x86 *c = &cpu_data(0); unsigned int i; - int result; /* capability check */ if ((c->x86_vendor != X86_VENDOR_AMD) || @@ -223,12 +222,7 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; policy->cur = elanfreq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, elanfreq_table); - if (result) - return result; - - cpufreq_frequency_table_get_attr(elanfreq_table, policy->cpu); - return 0; + return cpufreq_table_validate_and_show(policy, elanfreq_table); }