From patchwork Fri Nov 28 09:44:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41687 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 75D50244C2 for ; Fri, 28 Nov 2014 09:45:58 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf4041513eek.9 for ; Fri, 28 Nov 2014 01:45:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=I2+I7ipocIavaVH8TTNgzuQvIgy1qvkDN9B16V/2gCM=; b=flKWhQ6WBtzZb7ttb8cfKV78RL12zQQ69L0zYbzgKU2O0JM6WLPXYXp15GH5C3goLK 2Uhdr6jOsJkFbGQs52b/oOTEtqdJOCLKjucrE90NHmAEqGxgr++Af/7JL14NVs9JPzf8 7D5/JwKkCHb1TBx3m9NMRjfBV0jmfDZ20igU5+82KUXmN9H0MhrKPBYqIoOYqFfLpfZI 4+vdnJl82A0sRx0DMkxJAZREesPvLXdeXkIWqp8lHsi0GZ/J9FAa9RXmiK9x0mBzUQxD QTGtdPYX8aCqSXoSaELXDdww2OJA12QNdSoPSycE0bCVK4IWzEYYZrr4wfGo6sCHXtqo JndA== X-Gm-Message-State: ALoCoQm2M7jaa1XzJ4tSnGYQP0NfOmFIsC3CKPZBqY5QBtpLsp6JpZRP7rE1kC5Eczvpzpn/mDZC X-Received: by 10.180.82.34 with SMTP id f2mr9748197wiy.1.1417167957686; Fri, 28 Nov 2014 01:45:57 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.104 with SMTP id kx8ls672467lac.82.gmail; Fri, 28 Nov 2014 01:45:57 -0800 (PST) X-Received: by 10.112.159.129 with SMTP id xc1mr43355488lbb.24.1417167957532; Fri, 28 Nov 2014 01:45:57 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id yf4si9419312lbb.124.2014.11.28.01.45.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:45:57 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id hs14so678112lab.11 for ; Fri, 28 Nov 2014 01:45:57 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr19536993lal.29.1417167957410; Fri, 28 Nov 2014 01:45:57 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp60511lbc; Fri, 28 Nov 2014 01:45:56 -0800 (PST) X-Received: by 10.68.191.33 with SMTP id gv1mr70925272pbc.33.1417167955763; Fri, 28 Nov 2014 01:45:55 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vj10si15336419pbc.138.2014.11.28.01.45.55 for ; Fri, 28 Nov 2014 01:45:55 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751775AbaK1Jpy (ORCPT + 12 others); Fri, 28 Nov 2014 04:45:54 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:49290 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427AbaK1Jpx (ORCPT ); Fri, 28 Nov 2014 04:45:53 -0500 Received: by mail-pd0-f170.google.com with SMTP id fp1so6433901pdb.29 for ; Fri, 28 Nov 2014 01:45:53 -0800 (PST) X-Received: by 10.68.227.104 with SMTP id rz8mr15199201pbc.4.1417167953305; Fri, 28 Nov 2014 01:45:53 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id pk1sm9373995pdb.78.2014.11.28.01.45.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:45:52 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, Viresh Kumar Subject: [PATCH 20/26] cpu_cooling: get_property() doesn't need to support GET_MAXL anymore Date: Fri, 28 Nov 2014 15:14:14 +0530 Message-Id: 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: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 05712d5..ddb97aa 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -81,7 +81,6 @@ static struct cpufreq_cooling_device *notify_device; enum cpufreq_cooling_property { GET_LEVEL, GET_FREQ, - GET_MAXL, }; /** @@ -89,12 +88,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: @@ -141,12 +139,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);