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: 5402511 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 48E0ABEEA8 for ; Fri, 28 Nov 2014 09:45:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC7E820142 for ; Fri, 28 Nov 2014 09:45:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 097E02013D for ; Fri, 28 Nov 2014 09:45:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751775AbaK1Jpy (ORCPT ); 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-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=SmlxCXUN3c5BrlFKeIwdux5DvRbHh1S7+H6Xe7J2xoI=; b=OwBm1Abpdfr3teSBFXSLbYgHowAfDca2nOlUZdSeVaD9jNy/8pTsmhXwA9rDUq0b5v nGaSpgTefgeteFjUJqzuNpreRqOquADAdoS8ZHl0Dx2Dhj5kX1+yHUEPR5SOqeklJAEY THnD5nIcqZClpiW/509QWXM01Pk5BgFv69I0Fh4x2amizm6TXHaFiNeEhHjg40AByUzo +unzqR8y1bZB14W9+J+YPsoK+hJe1Bu4Ok9g96dvxhy4uRI/CFdKFXXbvl3pi6z7KEPM 37YQ0l27+g3lhvpsavfE9jj3fdLabW5A64giqRlEUJk4+zfqDc3IJ9XfPy7t0ZTnRBHy K/uA== X-Gm-Message-State: ALoCoQlXPE1mM+feMfQB8+YPdwHf0TMx3QH5QCORqr71CclCXAP4f02rBrXgHiMbcsvk9hi0zoyn 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: 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 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);