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: 2983431 Return-Path: X-Original-To: patchwork-linux-pm@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 0CB51BFF0B for ; Thu, 3 Oct 2013 15:03:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74E5320150 for ; Thu, 3 Oct 2013 15:03:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C649620373 for ; Thu, 3 Oct 2013 15:02:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754032Ab3JCPCv (ORCPT ); Thu, 3 Oct 2013 11:02:51 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:62547 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754551Ab3JCPCu (ORCPT ); Thu, 3 Oct 2013 11:02:50 -0400 Received: by mail-pb0-f45.google.com with SMTP id mc17so2580402pbc.4 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=evZAyb2CLxfSO5k0dXTet7KB0JShldtpwGVp5kZeZSn1LoF1v1oLw9dFcAinN76ONZ Ir8suhU91sHtgRc3z5UZ1oEhn4+QxUcEz+eYe9pTvMyl2mAMHl/IhbITcPefFWfgZLo+ j2tqmZ/uBNsFKsE2x7p2LjhbguFtnixsnYFopd90HihlZlSXcV0GkjW2hBRbcCHMTSEs vMNvM7SAu+XJ5N7yVy8Rmr7yJSCrlBCGtW5h2L76ffw+zI9frue6WMwPjGt6FNp+Ejtf RGnkqe+XHZlJGZP1qMskLGJ2ZxY/CHzypfhbmkq4ic8M4mBoiyizNV9j5wTdqdzjBvHv fmOg== X-Gm-Message-State: ALoCoQnwbkUW9qomc5QKomM3MNIJeENVAjWOME4nmXyNoyCrn+6x8rJg04yr6MF7JE+8V4+B6BKP 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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=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: 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)