From 3738d2e3a2e0e7705f43e14bdb764b5f815e4253 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Tue, 16 Oct 2018 16:42:20 +0200 Subject: [PATCH] i2c-gpio-custom: add kernel version check As i2c-gpio.h was moved into linux/platform_data in 4.18, the include needs to be updated along with a version check. Signed-off-by: Zoltan HERPAI --- package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c b/package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c index 921d290d52..e876df6a57 100644 --- a/package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c +++ b/package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c @@ -43,11 +43,16 @@ */ #include +#include #include #include #include +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,18,0) #include +#else +#include +#endif #define DRV_NAME "i2c-gpio-custom" #define DRV_DESC "Custom GPIO-based I2C driver" -- 2.30.2