[PATCH 4/4] ACPI: Convert int to bool and propagete to struct field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Quentin Lambert <lambert.quentin@xxxxxxxxx>
---
 drivers/acpi/thermal.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index d24fa19..bc72f1d 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -189,7 +189,7 @@ struct acpi_thermal {
 	struct acpi_thermal_trips trips;
 	struct acpi_handle_list devices;
 	struct thermal_zone_device *thermal_zone;
-	int tz_enabled;
+	bool tz_enabled;
 	int kelvin_offset;
 	struct work_struct thermal_check_work;
 };
@@ -565,7 +565,7 @@ static int thermal_set_mode(struct thermal_zone_device *thermal,
 				enum thermal_device_mode mode)
 {
 	struct acpi_thermal *tz = thermal->devdata;
-	int enable;
+	bool enable;
 
 	if (!tz)
 		return -EINVAL;
@@ -574,9 +574,9 @@ static int thermal_set_mode(struct thermal_zone_device *thermal,
 	 * enable/disable thermal management from ACPI thermal driver
 	 */
 	if (mode == THERMAL_DEVICE_ENABLED)
-		enable = 1;
+		enable = true;
 	else if (mode == THERMAL_DEVICE_DISABLED) {
-		enable = 0;
+		enable = false;
 		pr_warn("thermal zone will be disabled\n");
 	} else
 		return -EINVAL;
@@ -930,7 +930,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
 	if (ACPI_FAILURE(status))
 		return -ENODEV;
 
-	tz->tz_enabled = 1;
+	tz->tz_enabled = true;
 
 	dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
 		 tz->thermal_zone->id);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux