[PATCH 5/7] Header location fix for 3.5.0 to 3.11.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Header does not exist before 3.5.0 and is merged into linux/i2c.h
in 3.12.0.

Signed-off-by: Brad Love <brad@xxxxxxxxxxxxxxxx>
---
 v4l/compat.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/v4l/compat.h b/v4l/compat.h
index d52c602..87ce401 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -2414,4 +2414,11 @@ static inline void *memdup_user_nul(const void __user *src, size_t len)
 #include <linux/frame.h>
 #endif
 
+/* header location for of_find_i2c_[device,adapter]_by_node */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
+#include <linux/of_i2c.h>
+#endif
+#endif
+
 #endif /*  _COMPAT_H */
-- 
2.7.4




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux