]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thermal/thresholds: Fix uapi header macros leading to a compilation error
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 12 Dec 2024 20:13:10 +0000 (21:13 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 16 Dec 2024 20:30:20 +0000 (21:30 +0100)
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: 445936f9e258 ("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>
include/uapi/linux/thermal.h

index ba8604bdf2069bc383e8fed7a229309756a665e9..349718c271ebf1c03642ee714a9f25fbc7f7fd42 100644 (file)
@@ -3,8 +3,8 @@
 #define _UAPI_LINUX_THERMAL_H
 
 #define THERMAL_NAME_LENGTH    20
-#define THERMAL_THRESHOLD_WAY_UP       BIT(0)
-#define THERMAL_THRESHOLD_WAY_DOWN     BIT(1)
+#define THERMAL_THRESHOLD_WAY_UP       0x1
+#define THERMAL_THRESHOLD_WAY_DOWN     0x2
 
 enum thermal_device_mode {
        THERMAL_DEVICE_DISABLED = 0,