Skip to content

Commit 65c8c78

Browse files
dlezcanorafaeljw
authored andcommitted
thermal/thresholds: Fix uapi header macros leading to a compilation error
The macros giving the direction of the crossing thresholds use the BIT macro which is not exported to the userspace. Consequently when an userspace program includes the header, it fails to compile. Replace the macros by their litteral to allow the compilation of userspace program using this header. Fixes: 445936f ("thermal: core: Add user thresholds support") Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://patch.msgid.link/20241212201311.4143196-1-daniel.lezcano@linaro.org [ rjw: Add Fixes: ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 78d4f34 commit 65c8c78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/uapi/linux/thermal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#define _UAPI_LINUX_THERMAL_H
44

55
#define THERMAL_NAME_LENGTH 20
6-
#define THERMAL_THRESHOLD_WAY_UP BIT(0)
7-
#define THERMAL_THRESHOLD_WAY_DOWN BIT(1)
6+
#define THERMAL_THRESHOLD_WAY_UP 0x1
7+
#define THERMAL_THRESHOLD_WAY_DOWN 0x2
88

99
enum thermal_device_mode {
1010
THERMAL_DEVICE_DISABLED = 0,

0 commit comments

Comments
 (0)