From patchwork Tue Jun 3 09:59:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Punit Agrawal X-Patchwork-Id: 4286351 X-Patchwork-Delegate: rui.zhang@intel.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 65353BEEA7 for ; Tue, 3 Jun 2014 10:01:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 768332021A for ; Tue, 3 Jun 2014 10:01:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 848F5201CE for ; Tue, 3 Jun 2014 10:01:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbaFCKA7 (ORCPT ); Tue, 3 Jun 2014 06:00:59 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:51802 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750810AbaFCKA7 (ORCPT ); Tue, 3 Jun 2014 06:00:59 -0400 Received: from e102309-lin (e102309-lin.cambridge.arm.com [10.1.195.139]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with SMTP id s53A0mbX018664; Tue, 3 Jun 2014 11:00:48 +0100 Received: by e102309-lin (sSMTP sendmail emulation); Tue, 03 Jun 2014 11:00:48 +0100 From: Punit Agrawal To: Eduardo Valentin Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Zhang Rui , Punit Agrawal Subject: [PATCH] thermal: Bind cooling devices with the correct arguments Date: Tue, 3 Jun 2014 10:59:58 +0100 Message-Id: <1401789598-14967-1-git-send-email-punit.agrawal@arm.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 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 When binding cooling devices to thermal zones created from the device tree the minimum and maximum cooling states are in the wrong order leading to failure to bind. Fix the order of cooling states in the call to thermal_zone_bind_cooling_device to fix this. Cc:Zhang Rui Signed-off-by: Punit Agrawal Reviewed-by: Stephen Boyd Acked-by: Eduardo Valentin --- Hi Eduardo, I am hoping this can be picked up for 3.16 as a bug fix. Thanks, Punit drivers/thermal/of-thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 04b1be7..97d312f 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -156,8 +156,8 @@ static int of_thermal_bind(struct thermal_zone_device *thermal, ret = thermal_zone_bind_cooling_device(thermal, tbp->trip_id, cdev, - tbp->min, - tbp->max); + tbp->max, + tbp->min); if (ret) return ret; }