From patchwork Sat Aug 10 06:44:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18949 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 489CC246EB for ; Sat, 10 Aug 2013 06:49:52 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id 15sf1483595vea.1 for ; Fri, 09 Aug 2013 23:49:52 -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=WslTJX/1rvv6kREqQHDsbbDrD2h0OM1pyhUpDCMXLew=; b=L4mdlrjqMC/b5zxuwj4IpRiS7CebW1EmStBvjGTG6tP6xiFdNNk2EQ7r7RsAxvXalS 96lxWma/1xXAaj31MKvMneBNo3jPnP9bUJ/NnGa85/q9CyEJ13F03m291RsB6hK5R0W7 6eeInTsjZqZOEKgLvMktV73fNHkywZn/38guljumCKyaH7NmXWNUT2yBT8qLYC/yDR7K ugc71tL5xm7OXMYxCY5gk5DOeq1C+V5SX2k3w6OWijUxinMbAlJW80I3tsjb4WyO3CQg 1UYNUzUkKkOBDD5fIOWwjX4JFbKGvHzHQettH3YFy5LIBAEoUsmAupSm0qpYs8VjBzxP nSDg== X-Received: by 10.236.131.210 with SMTP id m58mr6581602yhi.45.1376117391985; Fri, 09 Aug 2013 23:49:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.74 with SMTP id g10ls1702824qey.60.gmail; Fri, 09 Aug 2013 23:49:51 -0700 (PDT) X-Received: by 10.58.181.225 with SMTP id dz1mr7598155vec.95.1376117391765; Fri, 09 Aug 2013 23:49:51 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id h4si2141457vdw.97.2013.08.09.23.49.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id id13so1606004vcb.4 for ; Fri, 09 Aug 2013 23:49:51 -0700 (PDT) X-Gm-Message-State: ALoCoQk7eEld7ajFoL6u7JoFTaqYShy/KhEcK9j4EIqMvLyUtLOUtAW5CvY+aFNXVNDwlZvNFJpA X-Received: by 10.52.109.69 with SMTP id hq5mr6428986vdb.85.1376117391688; Fri, 09 Aug 2013 23:49:51 -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 u4csp142vcz; Fri, 9 Aug 2013 23:49:51 -0700 (PDT) X-Received: by 10.68.19.162 with SMTP id g2mr14885228pbe.140.1376117390850; Fri, 09 Aug 2013 23:49:50 -0700 (PDT) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id xx2si7266563pac.140.2013.08.09.23.49.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.52; Received: by mail-pa0-f52.google.com with SMTP id kq13so5648425pab.39 for ; Fri, 09 Aug 2013 23:49:50 -0700 (PDT) X-Received: by 10.66.246.133 with SMTP id xw5mr14638567pac.114.1376117390507; Fri, 09 Aug 2013 23:49:50 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id dg3sm24155019pbc.24.2013.08.09.23.49.46 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:49:49 -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 , Linus Walleij Subject: [PATCH 16/44] cpufreq: dbx500: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:12 +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.220.173 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: Linus Walleij Signed-off-by: Viresh Kumar --- drivers/cpufreq/dbx500-cpufreq.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index ea03b92..7e2f9c0 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -19,16 +19,6 @@ static struct cpufreq_frequency_table *freq_table; static struct clk *armss_clk; -static struct freq_attr *dbx500_cpufreq_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - -static int dbx500_cpufreq_verify_speed(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, freq_table); -} - static int dbx500_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) @@ -113,12 +103,12 @@ static int dbx500_cpufreq_init(struct cpufreq_policy *policy) static struct cpufreq_driver dbx500_cpufreq_driver = { .flags = CPUFREQ_STICKY | CPUFREQ_CONST_LOOPS, - .verify = dbx500_cpufreq_verify_speed, + .verify = cpufreq_generic_frequency_table_verify, .target = dbx500_cpufreq_target, .get = dbx500_cpufreq_getspeed, .init = dbx500_cpufreq_init, .name = "DBX500", - .attr = dbx500_cpufreq_attr, + .attr = cpufreq_generic_attr, }; static int dbx500_cpufreq_probe(struct platform_device *pdev)