diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-11-02 19:14:47 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-15 14:28:48 +0100 |
commit | 6ca336479dd6238492e3801136adbcbe255537cb (patch) | |
tree | d37a365890e3b15b6ff9cf01cfaaf3c0e7b887d3 /package/kernel | |
parent | a116b8e0b6890e0437bbfbe29fdd1ac2bbc3c9a1 (diff) | |
download | upstream-6ca336479dd6238492e3801136adbcbe255537cb.tar.gz upstream-6ca336479dd6238492e3801136adbcbe255537cb.tar.bz2 upstream-6ca336479dd6238492e3801136adbcbe255537cb.zip |
i2c-gpio-custom: Adapt to moved include file
The i2c-gpio.h file was moved in kernel 4.18.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/i2c-gpio-custom/src/i2c-gpio-custom.c | 5 |
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" |