i2c-gpio-custom: Adapt to moved include file
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 2 Nov 2018 18:14:47 +0000 (19:14 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 15 Dec 2018 13:28:48 +0000 (14:28 +0100)
The i2c-gpio.h file was moved in kernel 4.18.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c

index 921d290d5206cd1198255a1391f2b4fbd2a1c58b..f9917e52fd649fb40f00951a9e00cd4cf1c578c4 100644 (file)
 #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"