public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: tianyu.lan@intel.com
To: rjw@sisk.pl, lenb@kernel.org
Cc: Lan Tianyu <tianyu.lan@intel.com>,
	linux-acpi@vger.kernel.org, rui.zhang@intel.com
Subject: [PATCH 3/3] ACPI/Thermal: Use THERMAL_TRIPS_NONE macro to replace number
Date: Wed, 14 Aug 2013 21:00:39 +0800	[thread overview]
Message-ID: <1376485239-18312-3-git-send-email-tianyu.lan@intel.com> (raw)
In-Reply-To: <1376485239-18312-1-git-send-email-tianyu.lan@intel.com>

From: Lan Tianyu <tianyu.lan@intel.com>

It's unreadable to pass "-1" as trip param directly to thermal_zone_bind_cooling_device.
So use THERMAL_TRIPS_NONE to replace it.

Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
 drivers/acpi/thermal.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 71ab083..9063239 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -833,12 +833,13 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
 		if (ACPI_SUCCESS(status) && (dev == device)) {
 			if (bind)
 				result = thermal_zone_bind_cooling_device
-						(thermal, -1, cdev,
-						 THERMAL_NO_LIMIT,
+						(thermal, THERMAL_TRIPS_NONE,
+						 cdev, THERMAL_NO_LIMIT,
 						 THERMAL_NO_LIMIT);
 			else
 				result = thermal_zone_unbind_cooling_device
-						(thermal, -1, cdev);
+						(thermal, THERMAL_TRIPS_NONE,
+						 cdev);
 			if (result)
 				goto failed;
 		}
-- 
1.8.4.rc0.1.g8f6a3e5.dirty


  parent reply	other threads:[~2013-08-14 13:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 13:00 [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal tianyu.lan
2013-08-14 13:00 ` [PATCH 2/3] ACPI/Thermal: Remove unused macro in the driver/acpi/thermal.c tianyu.lan
2013-08-14 13:00 ` tianyu.lan [this message]
2013-08-14 17:05 ` [PATCH 1/3] ACPI/Thermal: Remove the unused lock of struct acpi_thermal R, Durgadoss
2013-08-15  0:28   ` Lan Tianyu
2013-08-19 23:39     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376485239-18312-3-git-send-email-tianyu.lan@intel.com \
    --to=tianyu.lan@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox