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 <wigyori@uid0.hu>
*/
#include <linux/kernel.h>
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.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"