From patchwork Fri Sep 13 13:00:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20129 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5406520358 for ; Fri, 13 Sep 2013 13:11:56 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf1236654yhz.7 for ; Fri, 13 Sep 2013 06:11:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=BjkEFQ9fybvZ9t1ohM1nEG7VBiZHJpcoZCKZWpB1uWs=; b=K6Lni2bvvzFIOPp3jBxxKicJ13SWoong2n8YSOj/jc6P0ZG4Su06CccdAgII88hozP EuLSLJflgkzuzVfLwsFTgV+vJQ5ap3OgcdLfMiwXv3O2EJh2Rg10yDc4w8NERZGvW7yc hTJkSzmThSWkrOq2yMuocX/DTXdH2Li5zrEsGCbT2kNNcPywaeIeJR9qCrIz2/9ktnIY Fcq0NMVtJAuKsRfQUABnvekaMey/j0b2foWqQ1BNrErr9YzYvNNUw2PhWa3oCBpPyI3F PThZrw8CL49oQsj5krnHD/shIJQjcByddi01QNhAsGk49PBauwBepDK3vkygwESqP+gX kNLA== X-Gm-Message-State: ALoCoQlKD8HEiKitTwqeRThaWYBh6+ocmPIJCJ+4Ovcj6DzF+YrrYDGfxkr2/AEZ8A68t7+LLREg X-Received: by 10.236.223.130 with SMTP id v2mr5146942yhp.34.1379077916094; Fri, 13 Sep 2013 06:11:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.119.161 with SMTP id kv1ls1121784qeb.10.gmail; Fri, 13 Sep 2013 06:11:55 -0700 (PDT) X-Received: by 10.221.32.133 with SMTP id sk5mr1081317vcb.27.1379077915886; Fri, 13 Sep 2013 06:11:55 -0700 (PDT) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by mx.google.com with ESMTPS id b5si3105760vel.62.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.46 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.46; Received: by mail-vb0-f46.google.com with SMTP id p13so875004vbe.19 for ; Fri, 13 Sep 2013 06:11:55 -0700 (PDT) X-Received: by 10.58.196.132 with SMTP id im4mr1049566vec.28.1379077915812; Fri, 13 Sep 2013 06:11:55 -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 u4csp79896vcz; Fri, 13 Sep 2013 06:11:55 -0700 (PDT) X-Received: by 10.67.22.67 with SMTP id hq3mr15335548pad.132.1379077914861; Fri, 13 Sep 2013 06:11:54 -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 sj5si8090467pab.342.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:54 -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 uo5so1207869pbc.23 for ; Fri, 13 Sep 2013 06:11:54 -0700 (PDT) X-Received: by 10.68.132.71 with SMTP id os7mr1985488pbb.188.1379077914377; Fri, 13 Sep 2013 06:11:54 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id zq10sm18039476pab.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:53 -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, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 075/228] cpufreq: pasemi: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:21 +0530 Message-Id: <8a76fece462a8b3c8aa7aad94e0e20dffd227e97.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-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.46 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: , Most of the CPUFreq drivers do similar things in .exit() and .verify() routines and .attr. So its better if we have generic routines for them which can be used by cpufreq drivers then. This patch uses these generic routines for this driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pasemi-cpufreq.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c index 23bc8a82..16f2508 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -69,11 +69,6 @@ static struct cpufreq_frequency_table pas_freqs[] = { {0, CPUFREQ_TABLE_END}, }; -static struct freq_attr *pas_cpu_freqs_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - /* * hardware specific functions */ @@ -251,11 +246,6 @@ static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) return 0; } -static int pas_cpufreq_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, pas_freqs); -} - static int pas_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) @@ -298,9 +288,9 @@ static struct cpufreq_driver pas_cpufreq_driver = { .flags = CPUFREQ_CONST_LOOPS, .init = pas_cpufreq_cpu_init, .exit = pas_cpufreq_cpu_exit, - .verify = pas_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = pas_cpufreq_target, - .attr = pas_cpu_freqs_attr, + .attr = cpufreq_generic_attr, }; /*