From patchwork Thu Oct 3 14:58:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2983421 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 812C1BFF0B for ; Thu, 3 Oct 2013 15:03:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C70972037D for ; Thu, 3 Oct 2013 15:02:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E54CD20150 for ; Thu, 3 Oct 2013 15:02:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754579Ab3JCPCv (ORCPT ); Thu, 3 Oct 2013 11:02:51 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:64926 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754471Ab3JCPCu (ORCPT ); Thu, 3 Oct 2013 11:02:50 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so2546644pbc.7 for ; Thu, 03 Oct 2013 08:02:50 -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=tZbbZ1/LpBx4A7nPza6iLHNlf4pNomIIh5+Z7XO4RxI=; b=eahAdv1RbkIvdNaBoYF0zjo0dijJ7IZyCW/GDgt7FqKagp5DO884qWiJYe2kTuEThw 8YzL5167R4dHQb9MfR+PVf/JO+oFunL9D5xnu0Wysuc0QUHv5EcF8TnVnmZVw1CpCOxC z6bHEc+O/HjTkvOBm38wfofuc7Q11oRQhY/6i2GZ52q/gvQHZoHd0kKF77AHmiwtQhu4 XRYBC33ldBT/2c1uBvvveUS/8cl2v7gJR6wUA/XeztcJfhrIFuQa0B5NW4syL6Ot3cLl Iv26GsqWyGXzGuIh43ZmyYUhiAeELfCz9bD/eAYpWzZmxcsL6SP/CPgw7/4nwjlVt2LY LWMQ== X-Gm-Message-State: ALoCoQlDCs2HbLGgOXsuWUKUARY2QL5I3QjJSQVaqv2XgBkpFk935dlieXvK4Emw7O2iMTgrT8xT X-Received: by 10.68.132.33 with SMTP id or1mr990853pbb.143.1380812570207; Thu, 03 Oct 2013 08:02:50 -0700 (PDT) Received: from localhost ([122.167.152.64]) by mx.google.com with ESMTPSA id tx5sm8772993pbc.29.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:02:49 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar , Paul Mundt , linux-sh@vger.kernel.org Subject: [PATCH V2 Resend 31/92] cpufreq: sh: Use generic cpufreq routines Date: Thu, 3 Oct 2013 20:28:25 +0530 Message-Id: <59688d8381646e3b617d973f9eeee9d2a29e6d30.1380783079.git.viresh.kumar@linaro.org> 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=-7.6 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)