From patchwork Thu Aug 8 13:48:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841274 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 D2DF89F271 for ; Thu, 8 Aug 2013 15:06:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A511120526 for ; Thu, 8 Aug 2013 15:06:57 +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 6B89320522 for ; Thu, 8 Aug 2013 15:06:56 +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 1V7Qgs-0006zP-3j; Thu, 08 Aug 2013 13:55:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QgD-0004xY-M5; Thu, 08 Aug 2013 13:55:05 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qe4-0004dz-EK for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:52:53 +0000 Received: by mail-pa0-f49.google.com with SMTP id bi5so3467928pad.36 for ; Thu, 08 Aug 2013 06:52:31 -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=mSd8YB8xrZEFgf/4pycWM3J4KGxxKs2M8QO61GF5lFE=; b=ENfxZQM53j+cfKJVf0l4g6BAXElN6qz1IUcD6tdmChwIMbM2xBMZvHNGIQ51I2Vvck vO6zODid9SVHTCQH5DPXwK6KTJfb9DEs17PnG6gF61kzG6YJcrHTs7ePnmrq1fbQQQEA UbYv0nrrERbeuNcQcYnPuDHRdlJxcKHPtMOc7DFH14W/r2gB/XpmFYyxvXkVX2MI/SaO 2d0xohs7z0ou3TRLiydzwJGbWNx/ROsau1PvBcu4zq/xefEFaL+BVg11xiujabLv1jYe 13ijgNjIIoecZHGU6QZaMCNT9T8RzyDrgg3Qm5zs66Cbym/ZKPmp1hBghbpxRm4DKQjN FUlA== X-Gm-Message-State: ALoCoQn6sGEjUCrrQ0W77exHfn/LcYK5SjsUwUHrZ3KR4T9kmuqj8SjU1G7yJQsz01jmvcfRmP5u X-Received: by 10.68.180.1 with SMTP id dk1mr6204869pbc.174.1375969951077; Thu, 08 Aug 2013 06:52:31 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id zv11sm16729249pab.3.2013.08.08.06.52.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:30 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 30/35] cpufreq: sc520: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:32 +0530 Message-Id: <8d7ce27a8756d11c8aeefc9f106436a01b8b8289.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130808_095252_613518_DD460168 X-CRM114-Status: GOOD ( 11.08 ) 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/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); }