extcon: fix building extcon-usb-fixed with old kernel sources 24/318824/1 accepted/tizen/9.0/unified/20241101.025315 accepted/tizen/unified/20241101.174200 accepted/tizen/unified/x/20241101.105727
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 9 Oct 2024 09:10:28 +0000 (11:10 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 9 Oct 2024 09:43:36 +0000 (11:43 +0200)
Change-Id: I7e6cb0eca53b93af6a80b8255e5256b1ff9980c3
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
kernel/extcon-usb-fixed.c

index aa6aeeb215b8f034f8f568afd69422d2f96c48d0..a50f6c04ce75ac3935ded1cbe0ea0a2e1c27dd07 100644 (file)
@@ -6,7 +6,12 @@
  * Author: Marek Szyprowski <m.szyprowski@samsung.com>
  */
 
-#include <linux/extcon-provider.h>
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+# include <linux/extcon-provider.h>
+#else
+# include <linux/extcon.h>
+#endif
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>