[PATCH 09/19] header: adapt thermal_zone_device_register() signature changes

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

 



The signature of thermal_zone_device_register() changed for kernel <
3.10 multiple times, adapt the backports code to the old signature.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/thermal.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 backport/backport-include/linux/thermal.h

diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h
new file mode 100644
index 0000000..c06dee6
--- /dev/null
+++ b/backport/backport-include/linux/thermal.h
@@ -0,0 +1,17 @@
+#ifndef __BACKPORT_THERMAL_H__
+#define __BACKPORT_THERMAL_H__
+#include_next <linux/thermal.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)
+#define thermal_zone_device_register(type, trips, mask, devdata, ops, tzp, passive_delay, polling_delay) \
+	thermal_zone_device_register(type, trips, devdata, ops, 0, 0, passive_delay, polling_delay)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+#define thermal_zone_device_register(type, trips, mask, devdata, ops, tzp, passive_delay, polling_delay) \
+	thermal_zone_device_register(type, trips, mask, devdata, ops, 0, 0, passive_delay, polling_delay)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+#define thermal_zone_device_register(type, trips, mask, devdata, ops, tzp, passive_delay, polling_delay) \
+	thermal_zone_device_register(type, trips, mask, devdata, ops, passive_delay, polling_delay)
+#endif /* < 3.8 */
+
+#endif /* __BACKPORT_THERMAL_H__ */
-- 
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux