summaryrefslogtreecommitdiff
path: root/v4l/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/compat.h')
-rw-r--r--v4l/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index b4c1ca374..16a6d03b4 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -497,6 +497,10 @@ do { \
#ifndef BIT_MASK
# define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
# define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
+
+#define i2c_verify_client(dev) \
+ ((dev->bus == &i2c_bus_type) ? to_i2c_client(dev) : NULL)
+
#endif