From patchwork Fri Sep 13 13:01:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2891581 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 B69349F1C0 for ; Fri, 13 Sep 2013 17:36:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A968520272 for ; Fri, 13 Sep 2013 17:36: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 82E952026D for ; Fri, 13 Sep 2013 17:36: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 1VKTTh-00078m-7B; Fri, 13 Sep 2013 13:32:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTTT-0000yF-6I; Fri, 13 Sep 2013 13:31:51 +0000 Received: from mail-pd0-f170.google.com ([209.85.192.170]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTHo-0007bN-M6 for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2013 13:19:49 +0000 Received: by mail-pd0-f170.google.com with SMTP id x10so1243207pdj.15 for ; Fri, 13 Sep 2013 06:19:27 -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=X6FtrOo+K8+1QnPbNbcQ9B27oYtnzbWidmhcL8M9d2o=; b=gqMW8Sw3X9ttS+iIIqLhx1XzHr6Z1Si2ueOY04reDQEXKJaIlkb0ojBVItbk+hWdMw JkAz4ilyaFkv1MZKN232Ps4xNgEozUrjfycKDrwcMIadY4zKuy8KkLxDq5dHw7D43QOS BDWHaM3xDQIvJ2NpD+jVW07+YPGAlRqaHaBa7GEbjEt3X1GOaOpy0mEZ+hnw/uPUv28i MOgN79iIGA3NBqfi2pY4SVYtTbXKHMlmCoVJN6JfSlLWUXHxDcELU9jzNOCocHAm6uSc wh4ym0RI7+9mqICz9h6DWwCVtikBzhEezyhsp3ryC9v5c0EiNlflh+le5fAXnKQhz7ys Kwow== X-Gm-Message-State: ALoCoQlRMAalr+th8VCQWTKPGlIdi0lNP/2k5QHlA2DKnwr3X7Gn56CylCGoOJffnJ6btuzKkYxW X-Received: by 10.68.236.168 with SMTP id uv8mr13549670pbc.124.1379078367320; Fri, 13 Sep 2013 06:19:27 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id bt1sm11750874pbb.2.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:19:26 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 139/228] cpufreq: pasemi: use cpufreq_generic_init() routine Date: Fri, 13 Sep 2013 18:31:25 +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-20130913_091948_875192_76B1D373 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) 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. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pasemi-cpufreq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c index 16f2508..1cca332 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -204,20 +204,13 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) pr_debug("%d: %d\n", i, pas_freqs[i].frequency); } - policy->cpuinfo.transition_latency = get_gizmo_latency(); - cur_astate = get_cur_astate(policy->cpu); pr_debug("current astate is at %d\n",cur_astate); policy->cur = pas_freqs[cur_astate].frequency; - cpumask_copy(policy->cpus, cpu_online_mask); - ppc_proc_freq = policy->cur * 1000ul; - /* this ensures that policy->cpuinfo_min and policy->cpuinfo_max - * are set correctly - */ - return cpufreq_table_validate_and_show(policy, pas_freqs); + return cpufreq_generic_init(policy, pas_freqs, get_gizmo_latency()); out_unmap_sdcpwr: iounmap(sdcpwr_mapbase);