aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/i2c-gpio-custom
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/i2c-gpio-custom')
-rw-r--r--package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c5
1 files changed, 5 insertions, 0 deletions
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..f9917e52fd 100644
--- a/package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c
+++ b/package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c
@@ -47,7 +47,12 @@
#include <linux/init.h>
#include <linux/platform_device.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
#include <linux/i2c-gpio.h>
+#else
+#include <linux/platform_data/i2c-gpio.h>
+#endif
#define DRV_NAME "i2c-gpio-custom"
#define DRV_DESC "Custom GPIO-based I2C driver"