From patchwork Sat Aug 10 06:44:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2842332 X-Patchwork-Delegate: lethal@linux-sh.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 521B5BF546 for ; Sat, 10 Aug 2013 06:54:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 73AE020284 for ; Sat, 10 Aug 2013 06:54:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F06E20279 for ; Sat, 10 Aug 2013 06:54:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032016Ab3HJGw2 (ORCPT ); Sat, 10 Aug 2013 02:52:28 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:33519 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161083Ab3HJGwY (ORCPT ); Sat, 10 Aug 2013 02:52:24 -0400 Received: by mail-pd0-f172.google.com with SMTP id z10so1397360pdj.17 for ; Fri, 09 Aug 2013 23:52:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=tZbbZ1/LpBx4A7nPza6iLHNlf4pNomIIh5+Z7XO4RxI=; b=ofRb0fuIBdiSBVVYibXnqDavhRW90HabnWzTbQF0dFG7sEgh6z4CHbOANmOzSTnvqL KGXAvZtFuN37xxBt8UdlHjsJJEK/az4KDyQtsHH2td+sMA67yyHmrQBJzXwNTdtdPsw+ xwydlnj4sko212RMyKFtMlAHiq4CNI0Y3M4QnJiOpU7lRs66j4ZPn2ZwgIv+SGEt1UE5 4oPTfeDPRlnvZ9a3DgcXkV8M2mFDUQkkD8trDCKqpc6FUiYkZ9uE5100p5z7CtC5H4gF T1TUsXjK744wYiZs4khxpilNqd8dVayHpLpK7evnqyUU6M+Om0ma3brdH66c0dd3cRxA 8eOw== X-Gm-Message-State: ALoCoQkHyGcu+V8qzmMLbdG0DQkC6GQx6bMIYaZthr+nMu6vfhBSeLvZOcZG7emExZRZ7I21Uw9b X-Received: by 10.66.252.234 with SMTP id zv10mr4214036pac.186.1376117544206; Fri, 09 Aug 2013 23:52:24 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id nv6sm24195483pbc.6.2013.08.09.23.52.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:52:23 -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 , Paul Mundt , linux-sh@vger.kernel.org Subject: [PATCH 38/44] cpufreq: sh: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:34 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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: Paul Mundt Cc: linux-sh@vger.kernel.org Signed-off-by: Viresh Kumar --- drivers/cpufreq/sh-cpufreq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/cpufreq/sh-cpufreq.c b/drivers/cpufreq/sh-cpufreq.c index 1362e88..91c6446 100644 --- a/drivers/cpufreq/sh-cpufreq.c +++ b/drivers/cpufreq/sh-cpufreq.c @@ -154,11 +154,6 @@ static int sh_cpufreq_cpu_exit(struct cpufreq_policy *policy) return 0; } -static struct freq_attr *sh_freq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver sh_cpufreq_driver = { .name = "sh", .get = sh_cpufreq_get, @@ -166,7 +161,7 @@ static struct cpufreq_driver sh_cpufreq_driver = { .verify = sh_cpufreq_verify, .init = sh_cpufreq_cpu_init, .exit = sh_cpufreq_cpu_exit, - .attr = sh_freq_attr, + .attr = cpufreq_generic_attr, }; static int __init sh_cpufreq_module_init(void)