From patchwork Fri Sep 13 13:00:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20140 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f200.google.com (mail-ye0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 20D2320358 for ; Fri, 13 Sep 2013 13:13:14 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r3sf1157408yen.7 for ; Fri, 13 Sep 2013 06:13:13 -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=+HHZgWSPxXibPAxbzYIPAWSXYb/H7FJVRJUJsOiYmgc=; b=k8oKRNQi1ae8UWmBwEiJQ7V5bdWY06DviLxPwHaYx8mstvJnXEQvIMCGhVv9dcRAA7 Grpxw5lcdLM/jFA8zJXEajljf8uQnoRj+f+hhp2BuZu4YXaTFya+fdx4VhoX/RD0hLu/ GER0KJQ1A81a592iJrldF6ugSN7pmwozAZ2iYd4H8YN/JN65ZBkbpOVaqwmIAMoLY2Y8 KCVfpVmzC0HugKfog2mU1nwUqVIHa0/1Na+XX/HRasdsFC8bTHPvIVUXDS2l9d8GbNv0 zhgqeG/tUqCoSNX/cZGCvYcKzUv+Ikp4kkIxCXGi/0Ry+pIXX8Tw3Ei0MPnzzgrJV7Wr 5dNA== X-Gm-Message-State: ALoCoQlhujkkuNLz/U0T/rQ9kmLRSK+vXNoAMmcGeuqPpCbTwmYA41UTx031rnHsPpMRzUdweDi4 X-Received: by 10.236.53.70 with SMTP id f46mr5018032yhc.17.1379077993753; Fri, 13 Sep 2013 06:13:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.28.10 with SMTP id x10ls1215409qeg.20.gmail; Fri, 13 Sep 2013 06:13:13 -0700 (PDT) X-Received: by 10.52.157.134 with SMTP id wm6mr5843846vdb.26.1379077993555; Fri, 13 Sep 2013 06:13:13 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id gq10si3090837vdc.108.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:13:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 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.47; Received: by mail-vb0-f47.google.com with SMTP id h10so879810vbh.6 for ; Fri, 13 Sep 2013 06:13:13 -0700 (PDT) X-Received: by 10.220.10.194 with SMTP id q2mr11820025vcq.2.1379077993481; Fri, 13 Sep 2013 06:13:13 -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 u4csp79947vcz; Fri, 13 Sep 2013 06:13:12 -0700 (PDT) X-Received: by 10.66.218.198 with SMTP id pi6mr15428980pac.107.1379077992592; Fri, 13 Sep 2013 06:13:12 -0700 (PDT) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id sj5si8097317pab.110.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:13:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.52; Received: by mail-pa0-f52.google.com with SMTP id kq13so2498319pab.39 for ; Fri, 13 Sep 2013 06:13:11 -0700 (PDT) X-Received: by 10.66.227.2 with SMTP id rw2mr15266864pac.131.1379077991798; Fri, 13 Sep 2013 06:13:11 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id oh2sm11717111pbb.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:13:11 -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 , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH 086/228] cpufreq: sparc: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:32 +0530 Message-Id: <5cf8e2c2fb92577ef065fa85abeef68fa52a9b59.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.212.47 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: David S. Miller Cc: sparclinux@vger.kernel.org Signed-off-by: Viresh Kumar --- drivers/cpufreq/sparc-us2e-cpufreq.c | 8 +------- drivers/cpufreq/sparc-us3-cpufreq.c | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index 8db0c18..291688c 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c @@ -295,12 +295,6 @@ static int us2e_freq_target(struct cpufreq_policy *policy, return 0; } -static int us2e_freq_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, - &us2e_freq_table[policy->cpu].table[0]); -} - static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) { unsigned int cpu = policy->cpu; @@ -363,7 +357,7 @@ static int __init us2e_freq_init(void) goto err_out; driver->init = us2e_freq_cpu_init; - driver->verify = us2e_freq_verify; + driver->verify = cpufreq_generic_frequency_table_verify; driver->target = us2e_freq_target; driver->get = us2e_freq_get; driver->exit = us2e_freq_cpu_exit; diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index 120a2df..9b3dbd3 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c @@ -156,12 +156,6 @@ static int us3_freq_target(struct cpufreq_policy *policy, return 0; } -static int us3_freq_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, - &us3_freq_table[policy->cpu].table[0]); -} - static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) { unsigned int cpu = policy->cpu; @@ -224,7 +218,7 @@ static int __init us3_freq_init(void) goto err_out; driver->init = us3_freq_cpu_init; - driver->verify = us3_freq_verify; + driver->verify = cpufreq_generic_frequency_table_verify; driver->target = us3_freq_target; driver->get = us3_freq_get; driver->exit = us3_freq_cpu_exit;