From patchwork Fri Sep 13 13:00:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2891171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1390D9F1C0 for ; Fri, 13 Sep 2013 16:55:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15060202B9 for ; Fri, 13 Sep 2013 16:55:26 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E6E3202B8 for ; Fri, 13 Sep 2013 16:55:24 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTJB-0006R4-4B; Fri, 13 Sep 2013 13:21:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTIX-0007lx-DK; Fri, 13 Sep 2013 13:20:33 +0000 Received: from mail-pd0-f180.google.com ([209.85.192.180]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VKTBJ-0006f9-4G for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2013 13:13:06 +0000 Received: by mail-pd0-f180.google.com with SMTP id y10so1228139pdj.25 for ; Fri, 13 Sep 2013 06:12:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=9ZkOAAFyNZ76imkEDiu+8XIqMPrxj2CG2bfbuI5NYWM=; b=Ojxvkcturx1i6FqhxrgpBNS79sRXnznwCarPE+V/7fOA6BtEojgRvqIQR38l+31fzD bPq3/TiT+4DrV2FZTsgkcB2bwChMGiwIm19oQ4GxbIa84ulKRVsFqHcgLmeQLtRahuV2 Aibcc+gPtLg38KfhPCbgnu1nkyHDxsjB41fCzup7iNS2ajsBb/vKvSAjcVoYQ19CJyKc BTShrfKzherC1K/TjduzqDbFS0Xsspbtq8KqtD4WU2J+mXAKSegf50gZ1WroCAl1+usG aRUm+b1qQ1jbC9diNr4dAVq5abNw+m9Od4SP6llN61Zf9k+f8rGtxvJ1EPTNs006dMFQ hpPA== X-Gm-Message-State: ALoCoQmsl8kOBlKBetSdJe1zIalG1pDRvrjv/ueBtfkFE63ysXh3+JK31K/zbX+l3COFb8zSbamr X-Received: by 10.68.238.34 with SMTP id vh2mr13378740pbc.101.1379077963697; Fri, 13 Sep 2013 06:12:43 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id gh9sm11670532pbc.40.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:12:43 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 082/228] cpufreq: s5pv210: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:28 +0530 Message-Id: <4c25cc8d8e42899f59559ec0fcdd3fdd3317b74a.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130913_091305_291100_1B23330D X-CRM114-Status: GOOD ( 12.10 ) X-Spam-Score: -1.9 (-) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, Kukjin Kim , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Kukjin Kim Signed-off-by: Viresh Kumar --- drivers/cpufreq/s5pv210-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c index c266a7e..0eafc52 100644 --- a/drivers/cpufreq/s5pv210-cpufreq.c +++ b/drivers/cpufreq/s5pv210-cpufreq.c @@ -174,14 +174,6 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq) __raw_writel(tmp1, reg); } -static int s5pv210_verify_speed(struct cpufreq_policy *policy) -{ - if (policy->cpu) - return -EINVAL; - - return cpufreq_frequency_table_verify(policy, s5pv210_freq_table); -} - static unsigned int s5pv210_getspeed(unsigned int cpu) { if (cpu) @@ -603,7 +595,7 @@ static int s5pv210_cpufreq_reboot_notifier_event(struct notifier_block *this, static struct cpufreq_driver s5pv210_driver = { .flags = CPUFREQ_STICKY, - .verify = s5pv210_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = s5pv210_target, .get = s5pv210_getspeed, .init = s5pv210_cpu_init,