From patchwork Fri Sep 13 13:00:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2885321 X-Patchwork-Delegate: lethal@linux-sh.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC2F89F1E3 for ; Fri, 13 Sep 2013 13:13:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C28620336 for ; Fri, 13 Sep 2013 13:13:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60C452037B for ; Fri, 13 Sep 2013 13:13:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932954Ab3IMNNH (ORCPT ); Fri, 13 Sep 2013 09:13:07 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:60038 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932908Ab3IMNNF (ORCPT ); Fri, 13 Sep 2013 09:13:05 -0400 Received: by mail-pb0-f46.google.com with SMTP id rq2so1219478pbb.19 for ; Fri, 13 Sep 2013 06:13:04 -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=+p9M3tHZ4WT/3FGYm/idTH2GfQX1tT8Y8AhOpnK5BEU=; b=Q75BTiY0F5uB3rdBO7AvzAP1d7rlrX/xSX8kK2fhpPF3O6DLmdXtLdoilbGiQvNqXk VSrtLAB7nZTtr8Ng6jYxTlQzF0lVZDYxY5XJxhKxsJ+2/kfL5Q4JnzSB7yKfJDsuSpQm ut+iy8zvlcDk1omdCmGST0ptaUYY9f0C5ZLwszMvm326o+nWb80DyZm2bChKGa2/IEfy eKXOjvMye5P+slT3/a4Owym30usmdsCKRQ7ZaeJygTtxLrDVZSIGmfObCkwex/9V4TPQ 5EO4X+DqoMU1dWuFbG4rGqbxMODmAYJdLZYNCYc1D6j9x3n1xaR80FwDGQljYzeCSEah dKSw== X-Gm-Message-State: ALoCoQkA7C3f38vyDahodlazX8QG148hzDV7L3s4r/ZEJ46oon5cOIof0agYCWkN65qJGC7DVgp0 X-Received: by 10.66.249.134 with SMTP id yu6mr15390844pac.37.1379077984621; Fri, 13 Sep 2013 06:13:04 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id nv6sm11712788pbc.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:13:04 -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 , Paul Mundt , linux-sh@vger.kernel.org Subject: [PATCH 085/228] cpufreq: sh: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:31 +0530 Message-Id: <74417e54eb4b55ce4c54f24c3c39c2ea1cfde3f1.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: 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.8 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 f1fb944..c681b86 100644 --- a/drivers/cpufreq/sh-cpufreq.c +++ b/drivers/cpufreq/sh-cpufreq.c @@ -151,11 +151,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, @@ -163,7 +158,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)