diff options
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/compat.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 6b3504706..56eb30853 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -146,6 +146,12 @@ do { \ ((dev->bus && 0 == strcmp(dev->bus->name, "i2c")) ? to_i2c_client(dev) : NULL) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) +/* Construct an I2C_CLIENT_END-terminated array of i2c addresses */ +#define I2C_ADDRS(addr, addrs...) \ + ((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END }) +#endif + #ifndef USB_DEVICE_AND_INTERFACE_INFO # define USB_DEVICE_AND_INTERFACE_INFO(vend,prod,cl,sc,pr) \ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ |