From patchwork Fri Sep 13 13:01:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2890491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 954EABFF05 for ; Fri, 13 Sep 2013 16:04:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2FE62031A for ; Fri, 13 Sep 2013 16:04:34 +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 9311220318 for ; Fri, 13 Sep 2013 16:04:33 +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 1VKTSt-00062j-3B; Fri, 13 Sep 2013 13:31:16 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTSB-0000sH-3M; Fri, 13 Sep 2013 13:30:31 +0000 Received: from mail-pa0-f41.google.com ([209.85.220.41]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTH2-0007Tt-3K for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2013 13:19:01 +0000 Received: by mail-pa0-f41.google.com with SMTP id bj1so2524709pad.14 for ; Fri, 13 Sep 2013 06:18:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=6UD7FWpoac2rj+5lvqYoRAnP6Anyc3qnQGBLfuo7ks8=; b=WQM5ZNBcLBXilamHhs40AuT4I1/Z9cuaHTylrnWWL+FJsbNGFGd1aVGD3HuJr7HTeu pRq2hbG+ZNcsuS9VVcG8MCSI0mU6iTEd03SWky9GJocRrUbxvZwAcT09HRzRRJTUe/Ag dp4GsGFwiDQ+yD37hfdvPZ9quc7xxPyG4J97HQLHBlW0/NR0e6Z+4SJbLkAtB2I5pWpJ xb0gPaEbSxDqYOUi1dS97xJ5AdzBkjKp+Q974neKSRMmpZObkzF3SfFE06ooaMPPsQgh UeSZWxsRK/6Fs/d2R2Nj5dDRk6zslIsCeBmWIB0F/8vvVFuNH1/KGXUKzbbz6x9kdRqB U5QQ== X-Gm-Message-State: ALoCoQmoEM+Zdz3tpK88yz3Rpdb47jC9JzU7QU80+L9gnt5jHMkavOjnkuhTIDMCxAGYcsKa37XZ X-Received: by 10.68.162.36 with SMTP id xx4mr13198414pbb.47.1379078318599; Fri, 13 Sep 2013 06:18:38 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id yh1sm7118548pbc.21.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:38 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 132/228] cpufreq: dbx500: use cpufreq_generic_init() routine Date: Fri, 13 Sep 2013 18:31:18 +0530 Message-Id: <7703617a46c82433f7de644c35aafba9c880114d.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130913_091900_279871_A68E2B34 X-CRM114-Status: GOOD ( 11.60 ) 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=-5.1 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 Use generic cpufreq_generic_init() routine instead of replicating the same code here. Acked-by: Linus Walleij Signed-off-by: Viresh Kumar --- drivers/cpufreq/dbx500-cpufreq.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index ae1aa60..a60f769 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -74,26 +74,7 @@ static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu) static int dbx500_cpufreq_init(struct cpufreq_policy *policy) { - int res; - - /* get policy fields based on the table */ - res = cpufreq_table_validate_and_show(policy, freq_table); - if (res) { - pr_err("dbx500-cpufreq: Failed to read policy table\n"); - return res; - } - - /* - * FIXME : Need to take time measurement across the target() - * function with no/some/all drivers in the notification - * list. - */ - policy->cpuinfo.transition_latency = 20 * 1000; /* in ns */ - - /* policy sharing between dual CPUs */ - cpumask_setall(policy->cpus); - - return 0; + return cpufreq_generic_init(policy, freq_table, 20 * 1000); } static struct cpufreq_driver dbx500_cpufreq_driver = {