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: 2841273 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 914129F294 for ; Thu, 8 Aug 2013 15:05:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71C26204EC for ; Thu, 8 Aug 2013 15:05:42 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2AAAB204E0 for ; Thu, 8 Aug 2013 15:05:41 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qdu-0004ew-Vn; Thu, 08 Aug 2013 13:52:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QdB-0004YM-Nn; Thu, 08 Aug 2013 13:51:57 +0000 Received: from mail-pa0-f50.google.com ([209.85.220.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qc6-0004I9-Js for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:50:51 +0000 Received: by mail-pa0-f50.google.com with SMTP id fb10so3450819pad.23 for ; Thu, 08 Aug 2013 06:50:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=4pa7J5uHccb0aldwUPcVSDLSTKB8nPFt7/hYVHqcYdo=; b=fOusViyljTnQ46wEX10oh1uKy2m+0PPkrHRAdUyTH8V012IUEoDiWYyEEDYS236mUb epWJMSpa6xufr8nwCRbZBftFzHZdiXZTXnsIeDd16epy0jE+Sa1ESZs9bx8qFuPsUZPB lojIYLNpzaZ9ScxGZjP2PV4eyXA7YTmzdiIH2+H5l7o3vrF2cxdghj6vtgNI+jc36j1Q GtyAvYQvur47eYVPCH/MprL9zBdYab8+QPS5CdEDA15sFkRjrYNiTZmEqkxszGtga7mi 8fSwi1lyWkXaohv6JDW/9oPk6ehDNHoNiLOa/bM8h3t55eoSAsgqiST2BPsKxXfOUXZs oB1w== X-Gm-Message-State: ALoCoQlCDprk8FqpKDV9MPg4RkqKBOssUsnqgGevLPViGnIuUtRrZFwBnCx91BKGE4OjGoS8X1RB 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130808_095050_778446_E7003D81 X-CRM114-Status: GOOD ( 10.36 ) X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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); }