diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-30 16:36:08 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-30 16:36:08 -0300 |
commit | 2fbea57afdd3fb8da843ee44c1859b54d08433ad (patch) | |
tree | 4140c56526d11596b0c2d5c8176c7ff31eedec50 /v4l/compat.h | |
parent | 2e3dbe38af11659dad7ec398a503f64125c2617e (diff) | |
parent | b0b50913254709734afb1bcc907788c1beb15e62 (diff) | |
download | mediapointer-dvb-s2-2fbea57afdd3fb8da843ee44c1859b54d08433ad.tar.gz mediapointer-dvb-s2-2fbea57afdd3fb8da843ee44c1859b54d08433ad.tar.bz2 |
merge: http://www.kernellabs.com/hg/~dheitmueller/em28xx-terratec-zl10353/
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 6b3504706..11dc57109 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -9,7 +9,7 @@ * non-delayed work and struct delayed_work was created for delayed work. This * will rename the structures. Hopefully no one will decide to name something * delayed_work in the same context as something named work_struct. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) +#ifdef NEED_DELAYED_WORK #define delayed_work work_struct #define INIT_DELAYED_WORK(a,b,c) INIT_WORK(a,b,c) #endif @@ -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 \ |