Skip to content

Commit bb5ab1f

Browse files
committed
ACPI: thermal: Move symbol definitions to one place
Move all of the symbol definitions to the initial part of the code so they all can be found in one place. While at it, consolidate white space used in there. No functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Michal Wilczynski <[email protected]> Reviewed-by: Daniel Lezcano <[email protected]>
1 parent a809560 commit bb5ab1f

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

drivers/acpi/thermal.c

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,35 @@
4040
#define ACPI_THERMAL_NOTIFY_HOT 0xF1
4141
#define ACPI_THERMAL_MODE_ACTIVE 0x00
4242

43-
#define ACPI_THERMAL_MAX_ACTIVE 10
44-
#define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65
43+
#define ACPI_THERMAL_MAX_ACTIVE 10
44+
#define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65
45+
46+
#define ACPI_TRIPS_CRITICAL BIT(0)
47+
#define ACPI_TRIPS_HOT BIT(1)
48+
#define ACPI_TRIPS_PASSIVE BIT(2)
49+
#define ACPI_TRIPS_ACTIVE BIT(3)
50+
#define ACPI_TRIPS_DEVICES BIT(4)
51+
52+
#define ACPI_TRIPS_THRESHOLDS (ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE)
53+
54+
#define ACPI_TRIPS_INIT (ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \
55+
ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \
56+
ACPI_TRIPS_DEVICES)
57+
58+
/*
59+
* This exception is thrown out in two cases:
60+
* 1.An invalid trip point becomes invalid or a valid trip point becomes invalid
61+
* when re-evaluating the AML code.
62+
* 2.TODO: Devices listed in _PSL, _ALx, _TZD may change.
63+
* We need to re-bind the cooling devices of a thermal zone when this occurs.
64+
*/
65+
#define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str) \
66+
do { \
67+
if (flags != ACPI_TRIPS_INIT) \
68+
acpi_handle_info(tz->device->handle, \
69+
"ACPI thermal trip point %s changed\n" \
70+
"Please report to [email protected]\n", str); \
71+
} while (0)
4572

4673
MODULE_AUTHOR("Paul Diefenbaugh");
4774
MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
@@ -232,33 +259,6 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode)
232259
return 0;
233260
}
234261

235-
#define ACPI_TRIPS_CRITICAL BIT(0)
236-
#define ACPI_TRIPS_HOT BIT(1)
237-
#define ACPI_TRIPS_PASSIVE BIT(2)
238-
#define ACPI_TRIPS_ACTIVE BIT(3)
239-
#define ACPI_TRIPS_DEVICES BIT(4)
240-
241-
#define ACPI_TRIPS_THRESHOLDS (ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE)
242-
243-
#define ACPI_TRIPS_INIT (ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \
244-
ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \
245-
ACPI_TRIPS_DEVICES)
246-
247-
/*
248-
* This exception is thrown out in two cases:
249-
* 1.An invalid trip point becomes invalid or a valid trip point becomes invalid
250-
* when re-evaluating the AML code.
251-
* 2.TODO: Devices listed in _PSL, _ALx, _TZD may change.
252-
* We need to re-bind the cooling devices of a thermal zone when this occurs.
253-
*/
254-
#define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str) \
255-
do { \
256-
if (flags != ACPI_TRIPS_INIT) \
257-
acpi_handle_info(tz->device->handle, \
258-
"ACPI thermal trip point %s changed\n" \
259-
"Please report to [email protected]\n", str); \
260-
} while (0)
261-
262262
static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
263263
{
264264
acpi_status status;

0 commit comments

Comments
 (0)