From patchwork Sat Aug 10 06:44:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18950 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f197.google.com (mail-gh0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D231246EB for ; Sat, 10 Aug 2013 06:49:59 +0000 (UTC) Received: by mail-gh0-f197.google.com with SMTP id r20sf787648ghr.4 for ; Fri, 09 Aug 2013 23:49:59 -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=U4B7ROFbnIisArqnlDjEd1Rv45WcM8RRimWlhsDbYQs=; b=CdQgiezHk//Eisu0ydZfHNCpYWB1hcBXGVcwXqZ5uGflSBEKiSmgKPWcI0LrDTptj/ 4cU9Hkmu9rusLpRZxNzxOLbPNFR+5eJfL48GRLOfN3R8xAGAxCf/Oa4RqrUsHlkPcGLr un9vIeV9EZobDSSM9CK/S3ArNRPj9fD5iDm7xzX0kBxk8iWMURMJdkRvb5qiwF0PZzfg gzU5Wv8JJ0ZL982VFY1cElbfA2y5H2dofr1ApvGfywRpYWJVpjNPhF1tI6jtSZSc+OWI 1NKdt4zBFdJRnsO00FZMVDClE13QS0kHUMqOP7oA5iffqGtzh50O1qC+Qr6ig8VaPNAc Xm+w== X-Received: by 10.236.113.197 with SMTP id a45mr6694241yhh.14.1376117399325; Fri, 09 Aug 2013 23:49:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.58.4 with SMTP id m4ls1775417qeq.52.gmail; Fri, 09 Aug 2013 23:49:59 -0700 (PDT) X-Received: by 10.52.22.4 with SMTP id z4mr1852772vde.115.1376117399205; Fri, 09 Aug 2013 23:49:59 -0700 (PDT) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id ix2si5675054vdb.111.2013.08.09.23.49.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.42 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.42; Received: by mail-vb0-f42.google.com with SMTP id e12so4646179vbg.29 for ; Fri, 09 Aug 2013 23:49:59 -0700 (PDT) X-Gm-Message-State: ALoCoQlcA7da/JHTaqPg7wfWivG1/Ew+5q0Ztam/JOzzb2UjZdgbR3UXq2GoZV++8SFvxNPJH9hd X-Received: by 10.220.50.10 with SMTP id x10mr2104115vcf.86.1376117399079; Fri, 09 Aug 2013 23:49:59 -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 u4csp144vcz; Fri, 9 Aug 2013 23:49:58 -0700 (PDT) X-Received: by 10.68.197.226 with SMTP id ix2mr4229545pbc.149.1376117398231; Fri, 09 Aug 2013 23:49:58 -0700 (PDT) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by mx.google.com with ESMTPS id xx4si15756260pab.255.2013.08.09.23.49.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.176 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.176; Received: by mail-pd0-f176.google.com with SMTP id q10so1388309pdj.35 for ; Fri, 09 Aug 2013 23:49:57 -0700 (PDT) X-Received: by 10.68.211.233 with SMTP id nf9mr15184490pbc.26.1376117397861; Fri, 09 Aug 2013 23:49:57 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id s5sm24132654pbo.38.2013.08.09.23.49.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:57 -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 Subject: [PATCH 17/44] cpufreq: e_powersaver: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:13 +0530 Message-Id: <6afdf05679248ea6292a40ae4364e01ea4d2cad4.1376116345.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.42 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/e_powersaver.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index c1b7c99..a8cbbd0 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c @@ -198,12 +198,6 @@ static int eps_target(struct cpufreq_policy *policy, return ret; } -static int eps_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, - &eps_cpu[policy->cpu]->freq_table[0]); -} - static int eps_cpu_init(struct cpufreq_policy *policy) { unsigned int i; @@ -423,19 +417,14 @@ static int eps_cpu_exit(struct cpufreq_policy *policy) return 0; } -static struct freq_attr *eps_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver eps_driver = { - .verify = eps_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = eps_target, .init = eps_cpu_init, .exit = eps_cpu_exit, .get = eps_get, .name = "e_powersaver", - .attr = eps_attr, + .attr = cpufreq_generic_attr, };