summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-01-02 00:43:08 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2014-01-18 13:44:01 +0100
commit8a094bd6ab08cad4bc0ff329d08af92f4851dda3 (patch)
tree1c5e398d051a5014ff6129c898cc2ef053fd33f7
parenta86173f25c2f77384f849c6669609029e96744e7 (diff)
backports: fix i2c_add_mux_adapter() parameters
The class parameter was added in kernel 3.7 to i2c_add_mux_adapter() and could just be ignored by older kernel versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/i2c-mux.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/backport/backport-include/linux/i2c-mux.h b/backport/backport-include/linux/i2c-mux.h
new file mode 100644
index 00000000..a3a67ad6
--- /dev/null
+++ b/backport/backport-include/linux/i2c-mux.h
@@ -0,0 +1,11 @@
+#ifndef __BACKPORT_LINUX_I2C_MUX_H
+#define __BACKPORT_LINUX_I2C_MUX_H
+#include_next <linux/i2c-mux.h>
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+#define i2c_add_mux_adapter(parent, mux_dev, mux_priv, force_nr, chan_id, class, select, deselect) \
+ i2c_add_mux_adapter(parent, mux_dev, mux_priv, force_nr, chan_id, select, deselect)
+#endif
+
+#endif /* __BACKPORT_LINUX_I2C_MUX_H */