summaryrefslogtreecommitdiff
path: root/drivers/edgetpu/abrolhos-thermal.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edgetpu/abrolhos-thermal.c')
-rw-r--r--drivers/edgetpu/abrolhos-thermal.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/edgetpu/abrolhos-thermal.c b/drivers/edgetpu/abrolhos-thermal.c
index 2404f63..2740d08 100644
--- a/drivers/edgetpu/abrolhos-thermal.c
+++ b/drivers/edgetpu/abrolhos-thermal.c
@@ -13,6 +13,7 @@
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/thermal.h>
+#include <linux/version.h>
#include "abrolhos-firmware.h"
#include "abrolhos-platform.h"
@@ -141,6 +142,9 @@ static int edgetpu_state2power_internal(unsigned long state, u32 *power,
}
static int edgetpu_get_requested_power(struct thermal_cooling_device *cdev,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
+ struct thermal_zone_device *tz,
+#endif
u32 *power)
{
unsigned long state_original;
@@ -152,6 +156,9 @@ static int edgetpu_get_requested_power(struct thermal_cooling_device *cdev,
}
static int edgetpu_state2power(struct thermal_cooling_device *cdev,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
+ struct thermal_zone_device *tz,
+#endif
unsigned long state, u32 *power)
{
struct edgetpu_thermal *cooling = cdev->devdata;
@@ -167,6 +174,9 @@ static int edgetpu_state2power(struct thermal_cooling_device *cdev,
}
static int edgetpu_power2state(struct thermal_cooling_device *cdev,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
+ struct thermal_zone_device *tz,
+#endif
u32 power, unsigned long *state)
{
int i;