From patchwork Sat Aug 10 06:44:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18944 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6087F246EB for ; Sat, 10 Aug 2013 06:49:10 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id j10sf6010560qcx.10 for ; Fri, 09 Aug 2013 23:49:10 -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=8X1Bg1spRgM/4obt3X0zrPb5slwjFXuRnLkiSeOcZgk=; b=cQV6vHVCj4CdQ8UcRdL67ZXnFdhl8JdfL8JwoTiTZjby0C5ABaQ7FHrT8F4q+CEL65 N+wK5dAhlX+HwywDYBnwFPn04afS1AaFVdGbYxbE5CEyT2ACFi8+Eo5n3sP48KpdMlra GOK1FSlO6OqVWzRzo/JHkTaaGHLN9oe4de7S5uEgPfRQiCHLjQWipEP62dE3zMmGAKEP EQHKjCnDTaRhwL0ydIQA5jAv0Jktp8fbLIGiLWH0rwdZSI8Buvn65zJxUPXtoL5TvfNB Pd5y3E1LSOKV0w4TkAO53ozk8UPbekFvPW8fR24Paiwt9uMcd8/+Qamlr3xwhIkBJKPe WAkQ== X-Received: by 10.236.62.132 with SMTP id y4mr3473048yhc.13.1376117349970; Fri, 09 Aug 2013 23:49:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.110.195 with SMTP id ic3ls1760696qeb.62.gmail; Fri, 09 Aug 2013 23:49:09 -0700 (PDT) X-Received: by 10.52.75.4 with SMTP id y4mr6365577vdv.118.1376117349835; Fri, 09 Aug 2013 23:49:09 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id c13si5679235veu.77.2013.08.09.23.49.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 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.173; Received: by mail-ve0-f173.google.com with SMTP id cy12so4454434veb.4 for ; Fri, 09 Aug 2013 23:49:09 -0700 (PDT) X-Gm-Message-State: ALoCoQl0gAnhyHBD/+BM2acLaoREkd8vpAU68t4OCAcGt3ZM5jYIKyQ8xnacYlyb9WSf2ux5Y1eB X-Received: by 10.58.154.34 with SMTP id vl2mr7731454veb.35.1376117349726; Fri, 09 Aug 2013 23:49:09 -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 u4csp118vcz; Fri, 9 Aug 2013 23:49:09 -0700 (PDT) X-Received: by 10.68.223.225 with SMTP id qx1mr14792163pbc.157.1376117348725; Fri, 09 Aug 2013 23:49:08 -0700 (PDT) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by mx.google.com with ESMTPS id pn6si14641293pbb.141.2013.08.09.23.49.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.180 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.180; Received: by mail-pd0-f180.google.com with SMTP id y10so1378216pdj.39 for ; Fri, 09 Aug 2013 23:49:08 -0700 (PDT) X-Received: by 10.66.186.79 with SMTP id fi15mr4007946pac.160.1376117348372; Fri, 09 Aug 2013 23:49:08 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ht5sm24143396pbb.29.2013.08.09.23.49.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:07 -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 , Hans-Christian Egtvedt Subject: [PATCH 11/44] cpufreq: at32ap: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:07 +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.173 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. Cc: Hans-Christian Egtvedt Signed-off-by: Viresh Kumar Acked-by: Hans-Christian Egtvedt --- 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 e0c38d9..b27f750 100644 --- a/drivers/cpufreq/at32ap-cpufreq.c +++ b/drivers/cpufreq/at32ap-cpufreq.c @@ -22,16 +22,6 @@ static struct clk *cpuclk; -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 */ @@ -109,7 +99,7 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy) 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,