From patchwork Fri Sep 13 13:00:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20124 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 79F9D20358 for ; Fri, 13 Sep 2013 13:11:21 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id c41sf1239179yho.8 for ; Fri, 13 Sep 2013 06:11:21 -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=YVtq5VvJ0o/2NVbFbHsQhdfzGGNTpw56lZP2uuUz2pY=; b=gMCe1OQt9nMJMyjcX0wCuPY640H9tSL189wt58QfTx3qN+rJsRa8GOl81K2SeXxtgP uVVF+V073MCdvu2Xnhj1OFEGi0pKHhDo1V6SPO0h1qsaYeqYexSh/jSr9trr//bqUSY/ y88VAM/8wlnqJSarnTBaNEyGPAXb6wWZL43tIjsVBw7sxUIXjRfAAbMWjocUErUHOEUC YwJt/b35Ij+b5HgStvoSWMb328XYRAmYH5VeegwIvM7qXOk9FQmD2NXBqIn1Z4RUdTpm mws8axz3ALgJGr6TzoBLxE8KNm/e95LYbFcGMa5NuAKtWOUDZBLY55/5nGtwOCRnZrIB 1H9A== X-Gm-Message-State: ALoCoQlutaswAJnpFeU7iqRPHFTC5OG8rLO+pDPsP/JFLlAWP9SpgdTBFVhVVNlfuNAa+9qnu6Vv X-Received: by 10.236.0.232 with SMTP id 68mr4985644yhb.16.1379077881181; Fri, 13 Sep 2013 06:11:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.3.169 with SMTP id d9ls1204231qed.61.gmail; Fri, 13 Sep 2013 06:11:21 -0700 (PDT) X-Received: by 10.52.118.41 with SMTP id kj9mr11294vdb.44.1379077880953; Fri, 13 Sep 2013 06:11:20 -0700 (PDT) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id st7si3095039vdc.81.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.54 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.54; Received: by mail-vb0-f54.google.com with SMTP id q14so883881vbe.41 for ; Fri, 13 Sep 2013 06:11:20 -0700 (PDT) X-Received: by 10.52.100.202 with SMTP id fa10mr10102667vdb.0.1379077880856; Fri, 13 Sep 2013 06:11:20 -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 u4csp79863vcz; Fri, 13 Sep 2013 06:11:20 -0700 (PDT) X-Received: by 10.68.29.36 with SMTP id g4mr13411190pbh.145.1379077879971; Fri, 13 Sep 2013 06:11:19 -0700 (PDT) Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by mx.google.com with ESMTPS id z4si631016paz.2.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.47 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.47; Received: by mail-pb0-f47.google.com with SMTP id rr4so1215809pbb.6 for ; Fri, 13 Sep 2013 06:11:19 -0700 (PDT) X-Received: by 10.66.121.131 with SMTP id lk3mr15267643pab.61.1379077879430; Fri, 13 Sep 2013 06:11:19 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id j9sm18002408paj.18.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:18 -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 070/228] cpufreq: longhaul: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:16 +0530 Message-Id: <44ef88358799992e51a786756e17139fb620cdef.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.54 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/longhaul.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index 70b66fd..57d7b02 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c @@ -625,12 +625,6 @@ static void longhaul_setup_voltagescaling(void) } -static int longhaul_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, longhaul_table); -} - - static int longhaul_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) { @@ -924,25 +918,14 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) return cpufreq_table_validate_and_show(policy, longhaul_table); } -static int longhaul_cpu_exit(struct cpufreq_policy *policy) -{ - cpufreq_frequency_table_put_attr(policy->cpu); - return 0; -} - -static struct freq_attr *longhaul_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver longhaul_driver = { - .verify = longhaul_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = longhaul_target, .get = longhaul_get, .init = longhaul_cpu_init, - .exit = longhaul_cpu_exit, + .exit = cpufreq_generic_exit, .name = "longhaul", - .attr = longhaul_attr, + .attr = cpufreq_generic_attr, }; static const struct x86_cpu_id longhaul_id[] = {