From patchwork Thu Dec 4 04:12:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 5435201 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 8F010BEEA8 for ; Thu, 4 Dec 2014 04:14:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4CAC20265 for ; Thu, 4 Dec 2014 04:14:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE171201EF for ; Thu, 4 Dec 2014 04:14:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752740AbaLDEOI (ORCPT ); Wed, 3 Dec 2014 23:14:08 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:55969 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752582AbaLDEOH (ORCPT ); Wed, 3 Dec 2014 23:14:07 -0500 Received: by mail-pa0-f51.google.com with SMTP id ey11so17283298pad.10 for ; Wed, 03 Dec 2014 20:14:07 -0800 (PST) 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=Lm9UVou3aTpK3M/8Uq+BszUVSgBSIhIIAGhez9jivDk=; b=LdSUT1lKl7bnb8LlQfpt2lxxUQZ7g2punQu1jRsIh2zSC0dJKAq492JR4B8STNQz6+ nQqcrPlPak1TSga29DcymjvqTugbsvfYgPy3kurg/MB40krKQChjUYJzDxrG7NOYU2Zw /cOYTuT3wN3kQ+QxPu4zInnJ6Ab0FuC5IGm3qtaIkWzloeLV9v5sDhGUPFw7fgMmxJ1h s6oByeHkzPxt2He6J9kLQ1CHP4AbTme8FOBHCrf7lNkX/7fLusTi+uyTCJ1/Y+VF3UvG YH725ortqrrGzo9wxNjO3P0fNJ++kSsDdEzpKKB2uAD+Ujd6acS0HDjW63bwUOLpARyy EiYA== X-Gm-Message-State: ALoCoQlNDaPXFSSMjCIyh2ZD5AiqumxOCu/dZgDocizTKc3wwE34uGWP6XnnXzcxxSTZgP3DDM6z X-Received: by 10.68.230.97 with SMTP id sx1mr22216409pbc.154.1417666446988; Wed, 03 Dec 2014 20:14:06 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id fn5sm24532610pdb.55.2014.12.03.20.14.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:14:05 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, amit.daniel@samsung.com, javi.merino@arm.com, Viresh Kumar Subject: [PATCH V2 21/26] thermal: cpu_cooling: get_property() doesn't need to support GET_MAXL anymore Date: Thu, 4 Dec 2014 09:42:03 +0530 Message-Id: <76f4dd2d1e4b05119de5a99fcf1c1e685de1141d.1417664938.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd 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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 We don't use get_property() to find max levels anymore as it is done at boot now. So, don't support GET_MAXL in get_property(). Signed-off-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index d34cc5b..d2e6f84 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -116,7 +116,6 @@ static void release_idr(struct idr *idr, int id) enum cpufreq_cooling_property { GET_LEVEL, GET_FREQ, - GET_MAXL, }; /** @@ -124,12 +123,11 @@ enum cpufreq_cooling_property { * @cpu: cpu for which the property is required * @input: query parameter * @output: query return - * @property: type of query (frequency, level, max level) + * @property: type of query (frequency, level) * * This is the common function to - * 1. get maximum cpu cooling states - * 2. translate frequency to cooling state - * 3. translate cooling state to frequency + * 1. translate frequency to cooling state + * 2. translate cooling state to frequency * * Note that the code may be not in good shape * but it is written in this way in order to: @@ -176,12 +174,6 @@ static int get_property(unsigned int cpu, unsigned long input, /* max_level is an index, not a counter */ max_level--; - /* get max level */ - if (property == GET_MAXL) { - *output = (unsigned int)max_level; - return 0; - } - if (property == GET_FREQ) level = descend ? input : (max_level - input);