From patchwork Sat Aug 10 06:44:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18972 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f71.google.com (mail-vb0-f71.google.com [209.85.212.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0EC43246EB for ; Sat, 10 Aug 2013 06:52:34 +0000 (UTC) Received: by mail-vb0-f71.google.com with SMTP id g17sf393499vbg.2 for ; Fri, 09 Aug 2013 23:52:33 -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=+HHZgWSPxXibPAxbzYIPAWSXYb/H7FJVRJUJsOiYmgc=; b=nEPShS8bl8m2vau91SLlNOLVRQN/N7MF+DLbeQf2IIfv9GpyB0M29h5ZNzhaIEi6qG Q5et56JFMNxlP5fFc9V+SDBNd4p+jPdL4kcwUd1UzLBeE6rnGfwUUCpArVkWElaSxpRb 8cSevdemafFYpdK/wtySIzf4AvXH0bqHOtDtW37r40TniB3xyTSW9KuKbeura1Eg/1Pp /mVhqN016P5Ura/die3zedYAObmIW87y8QGiOBC+vtisG30FLAGKpdojbszOzzhqra6N y8YIWl5GKyO2OuCGEwyews8tcl90vAjaoBx93N5+IK1pfcT5RTj2HKij7JtdUaNSdp4I 2Okw== X-Received: by 10.236.70.105 with SMTP id o69mr6586417yhd.53.1376117553772; Fri, 09 Aug 2013 23:52:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.81.244 with SMTP id d20ls1818155qey.38.gmail; Fri, 09 Aug 2013 23:52:33 -0700 (PDT) X-Received: by 10.52.159.33 with SMTP id wz1mr1841709vdb.1.1376117553597; Fri, 09 Aug 2013 23:52:33 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id vf5si5642881vdc.83.2013.08.09.23.52.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:52:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id pb11so4448502veb.25 for ; Fri, 09 Aug 2013 23:52:33 -0700 (PDT) X-Gm-Message-State: ALoCoQnlLxwf1jSmigcKI+KGVvAX2CrhtlCe5O8odJ5Z9eoZnvwHMAJHO/jb2MTvy8EbIJNSK86Y X-Received: by 10.58.154.34 with SMTP id vl2mr7734330veb.35.1376117553522; Fri, 09 Aug 2013 23:52:33 -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 u4csp257vcz; Fri, 9 Aug 2013 23:52:33 -0700 (PDT) X-Received: by 10.68.129.138 with SMTP id nw10mr14708802pbb.158.1376117552656; Fri, 09 Aug 2013 23:52:32 -0700 (PDT) Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by mx.google.com with ESMTPS id tb9si14672045pbc.39.2013.08.09.23.52.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:52:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.49 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.49; Received: by mail-pb0-f49.google.com with SMTP id xb4so5185077pbc.36 for ; Fri, 09 Aug 2013 23:52:32 -0700 (PDT) X-Received: by 10.66.26.194 with SMTP id n2mr4312706pag.151.1376117552295; Fri, 09 Aug 2013 23:52:32 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id ll5sm26650452pab.19.2013.08.09.23.52.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:52:31 -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 , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH 39/44] cpufreq: sparc: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:35 +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.180 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;