clear-pkgs-linux-iot-lts2018/0935-Fix-compilation-errors...

63 lines
1.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zhou Furong <furong.zhou@intel.com>
Date: Mon, 27 Aug 2018 15:15:51 +0800
Subject: [PATCH] Fix compilation errors when rebase to v4.19-rc1.
Include header file of_platform.h when update kernel to v4.19-rc1.
Change-Id: I732913061fed8ab14edddb40544df370e19edc54
---
drivers/trusty/trusty-log.c | 4 ++++
drivers/trusty/trusty-timer.c | 4 ++++
drivers/trusty/trusty-wall.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/drivers/trusty/trusty-log.c b/drivers/trusty/trusty-log.c
index d2446a1f34c9..48883439dce2 100755
--- a/drivers/trusty/trusty-log.c
+++ b/drivers/trusty/trusty-log.c
@@ -12,6 +12,10 @@
*
*/
#include <linux/module.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+#include <linux/of_platform.h>
+#endif
#include <linux/platform_device.h>
#include <linux/trusty/smcall.h>
#include <linux/trusty/trusty.h>
diff --git a/drivers/trusty/trusty-timer.c b/drivers/trusty/trusty-timer.c
index 6783a30b4a11..ca6ea5799eeb 100644
--- a/drivers/trusty/trusty-timer.c
+++ b/drivers/trusty/trusty-timer.c
@@ -15,6 +15,10 @@
#include <linux/hrtimer.h>
#include <linux/module.h>
#include <linux/notifier.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+#include <linux/of_platform.h>
+#endif
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/trusty/smcall.h>
diff --git a/drivers/trusty/trusty-wall.c b/drivers/trusty/trusty-wall.c
index 2345f56a6405..812ac2a3ea98 100644
--- a/drivers/trusty/trusty-wall.c
+++ b/drivers/trusty/trusty-wall.c
@@ -13,6 +13,10 @@
*
*/
#include <linux/module.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+#include <linux/of_platform.h>
+#endif
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/trusty/smcall.h>
--
https://clearlinux.org