From patchwork Fri Sep 13 13:00:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20118 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D38EA20358 for ; Fri, 13 Sep 2013 13:10:38 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id r5sf1195385qcx.0 for ; Fri, 13 Sep 2013 06:10:38 -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=U4B7ROFbnIisArqnlDjEd1Rv45WcM8RRimWlhsDbYQs=; b=Y7Z49BV4peuzURU2CpFSR2e1G/w/2JyF5mS71H1oFe62t5XsrRB8yxLusRNChooAuX +AQOi6GT3APuVSOa4hgRJUHbiVle0zAFeSldBd3KvY/BBfGu38tplPHUdNyQANDex4vv v8ZS+vdAjtUFmUguiiHaP4I7ws1whdbye37isJcfXnLbOZHFxAEHGdbWWMXV8NadJwtT 08QEfj75xrkw0FCUQpi4KcB3Z1ZtP/zlQTUdqQ9hKk/Ax0fXwAtksrKFsvkjXU+eskFv Zh2taxFl8GBeG9QL41QL0ozPiuyspzxGyk0mOifdQ/7LAv/VhBKmHaPnUiCcwbHBsCSs /giQ== X-Gm-Message-State: ALoCoQnTf+X8s+wFRzrdQLLThEJ3g22i7Yw62WM8K6WXGvv4/usPbyR2QT9bZcFtFVBpqBxP9Z2V X-Received: by 10.236.51.9 with SMTP id a9mr5078121yhc.41.1379077838683; Fri, 13 Sep 2013 06:10:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.72 with SMTP id eo8ls1116913qeb.41.gmail; Fri, 13 Sep 2013 06:10:38 -0700 (PDT) X-Received: by 10.58.190.34 with SMTP id gn2mr34214vec.34.1379077838491; Fri, 13 Sep 2013 06:10:38 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id dt10si3096474vdb.73.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id jw12so966342veb.9 for ; Fri, 13 Sep 2013 06:10:38 -0700 (PDT) X-Received: by 10.52.110.98 with SMTP id hz2mr9200101vdb.1.1379077838410; Fri, 13 Sep 2013 06:10:38 -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 u4csp79830vcz; Fri, 13 Sep 2013 06:10:37 -0700 (PDT) X-Received: by 10.68.171.164 with SMTP id av4mr2029976pbc.175.1379077837298; Fri, 13 Sep 2013 06:10:37 -0700 (PDT) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by mx.google.com with ESMTPS id mj9si11149431pab.248.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.175 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.175; Received: by mail-pd0-f175.google.com with SMTP id q10so1226286pdj.20 for ; Fri, 13 Sep 2013 06:10:36 -0700 (PDT) X-Received: by 10.67.23.71 with SMTP id hy7mr15026263pad.99.1379077836889; Fri, 13 Sep 2013 06:10:36 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ys4sm11694991pbb.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:10:36 -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 064/228] cpufreq: e_powersaver: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:10 +0530 Message-Id: <398abf18b914085df814f99fc6d2dabbce0bf890.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.128.178 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, };