From patchwork Wed Aug 21 14:42:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19379 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B8B49248E6 for ; Wed, 21 Aug 2013 14:43:05 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id a41sf503384yho.0 for ; Wed, 21 Aug 2013 07:43:05 -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=K/qnbnZheL85cLs/ueVJT59h5B4dy5V5Dc//ZfWR86o=; b=JDJDDxZ7i4rC+gvwDHfanjIgdVshTcK+Jya997hjJHp4Fpkjt8xzC1SSxsAfshLH/v WPPcKnq19ZWoGKufnfDI/jtLV0RqXsHctR85UKeU49+wM3GfQvtnrm4BFJ11n2diXiFn Y+T9iwQ5CW7ALEOJveUcmAjU81sPpkt5kV/uARYp1YnamqzbpCmqakZ0pkgVu6BqTuwK 1n/YbA83hLnteG7CFE6UokUNhGwjvl+cMf6Xd2aThCPzHQnaL8DaUuYl3w3GUmVYlw2Q apJXZRpdfSmsRz89Sl8j2VnIVF9KhTLEG9SthNkskK7UCN3tOA3HacPfISHRJP/R9wHb Lehw== X-Received: by 10.58.188.15 with SMTP id fw15mr713280vec.9.1377096185476; Wed, 21 Aug 2013 07:43:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.168 with SMTP id w8ls656333qeu.64.gmail; Wed, 21 Aug 2013 07:43:05 -0700 (PDT) X-Received: by 10.58.198.13 with SMTP id iy13mr6830671vec.11.1377096185360; Wed, 21 Aug 2013 07:43:05 -0700 (PDT) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id dm3si1567626vdc.137.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id e13so378775vbg.3 for ; Wed, 21 Aug 2013 07:43:05 -0700 (PDT) X-Gm-Message-State: ALoCoQnZJa7LcisUuAHPmz5SAa+77Ku0wEuIW0wbXIut3ItJ9NGce67otBu4YTOhw3ypeAiKKF6c X-Received: by 10.52.164.16 with SMTP id ym16mr1357305vdb.32.1377096185273; Wed, 21 Aug 2013 07:43:05 -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 u4csp224540vcz; Wed, 21 Aug 2013 07:43:04 -0700 (PDT) X-Received: by 10.68.137.170 with SMTP id qj10mr7988250pbb.31.1377096184360; Wed, 21 Aug 2013 07:43:04 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id bo2si5394743pbb.194.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.50; Received: by mail-pb0-f50.google.com with SMTP id uo5so483026pbc.9 for ; Wed, 21 Aug 2013 07:43:03 -0700 (PDT) X-Received: by 10.66.192.132 with SMTP id hg4mr103971pac.84.1377096183904; Wed, 21 Aug 2013 07:43:03 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ht5sm8807447pbb.29.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:03 -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, Viresh Kumar , Linus Walleij Subject: [PATCH 03/14] cpufreq: dbx500: use cpufreq_generic_init() routine Date: Wed, 21 Aug 2013 20:12:22 +0530 Message-Id: <580c144ac4a85899ddc3d6350e50761c9d69b1fe.1377093938.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-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.212.44 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: , Use generic cpufreq_generic_init() routine instead of replicating the same code here. Cc: Linus Walleij Signed-off-by: Viresh Kumar Acked-by: Linus Walleij --- 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 f66cb72..0e67ab9 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -44,26 +44,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 = {