From patchwork Fri Sep 13 13:00:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20112 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A4ACD20358 for ; Fri, 13 Sep 2013 13:09:55 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id c14sf1223819vea.5 for ; Fri, 13 Sep 2013 06:09:55 -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=3UsKWRXr1X1gAler8AlW9hFv1kcabHy1nKikdZkKYsk=; b=HJXSbsL4lw90qpVII7biR5ko+FyCjx8shYwezt0aQvKKXsTv6sdJNkbWIt5ywY1fp2 bNcLSC8b/hx1U237HDcP8DuC3AO1cTfRgfPFWcy+Xn31V3Vbt7+1+7ai0uBL8SawGtUe eXVwWqEf0tO4bTt86X2iy7+RCPDxm5GSdR9pO3d3YEY88XqC+sqOx0KqaTJBK/6A74dr /g+rfWmhT9c/gDTENAnDikA02y+TBkDHq280nv4NkBzgo8io/tK1fYKy/G2Ji6qCFKwQ 0arvBMmI/giChAVjJXeuNOihmXu2MWlkFoYIGXLB9MI7BzPIh9v5lFKETuVJ6yTozWBq CD0Q== X-Gm-Message-State: ALoCoQm9mbvZK4pdionis9UYqJrScpFZDBn0CmGpJdWwLqOBFEgzcK2gXFWLcNejdNlq/LUEMAsI X-Received: by 10.236.7.130 with SMTP id 2mr5112350yhp.4.1379077795193; Fri, 13 Sep 2013 06:09:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.244 with SMTP id l20ls1122025qej.98.gmail; Fri, 13 Sep 2013 06:09:55 -0700 (PDT) X-Received: by 10.52.108.230 with SMTP id hn6mr1560120vdb.28.1379077794964; Fri, 13 Sep 2013 06:09:54 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id wh9si3097505vcb.93.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:09:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 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.179; Received: by mail-ve0-f179.google.com with SMTP id c14so945245vea.10 for ; Fri, 13 Sep 2013 06:09:54 -0700 (PDT) X-Received: by 10.52.100.202 with SMTP id fa10mr10097915vdb.0.1379077794880; Fri, 13 Sep 2013 06:09:54 -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 u4csp79789vcz; Fri, 13 Sep 2013 06:09:54 -0700 (PDT) X-Received: by 10.68.134.98 with SMTP id pj2mr13401669pbb.110.1379077793860; Fri, 13 Sep 2013 06:09:53 -0700 (PDT) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by mx.google.com with ESMTPS id yk3si11182712pac.157.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:09:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.41 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.41; Received: by mail-pb0-f41.google.com with SMTP id rp2so1219194pbb.14 for ; Fri, 13 Sep 2013 06:09:53 -0700 (PDT) X-Received: by 10.68.25.170 with SMTP id d10mr13583462pbg.78.1379077793352; Fri, 13 Sep 2013 06:09:53 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id dw3sm11682563pbc.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:09:52 -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 058/228] cpufreq: at32ap: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:04 +0530 Message-Id: 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.179 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. Acked-by: Hans-Christian Egtvedt Signed-off-by: Viresh Kumar --- drivers/cpufreq/at32ap-cpufreq.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/cpufreq/at32ap-cpufreq.c b/drivers/cpufreq/at32ap-cpufreq.c index 1d19fa5..788f7e7 100644 --- a/drivers/cpufreq/at32ap-cpufreq.c +++ b/drivers/cpufreq/at32ap-cpufreq.c @@ -24,16 +24,6 @@ static struct clk *cpuclk; static struct cpufreq_frequency_table *freq_table; -static int at32_verify_speed(struct cpufreq_policy *policy) -{ - if (policy->cpu != 0) - return -EINVAL; - - cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, - policy->cpuinfo.max_freq); - return 0; -} - static unsigned int at32_get_speed(unsigned int cpu) { /* No SMP support */ @@ -152,7 +142,7 @@ out_err: static struct cpufreq_driver at32_driver = { .name = "at32ap", .init = at32_cpufreq_driver_init, - .verify = at32_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = at32_set_target, .get = at32_get_speed, .flags = CPUFREQ_STICKY,