diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-02-05 22:41:54 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-02-05 22:41:54 -0200 |
commit | dffe9afaabd4c5c3aded53705d5421201d80dc74 (patch) | |
tree | 0f30d0c88f2366d1c0a2d8d9286290e3ecad7355 /v4l/compat.h | |
parent | 6ed8c3ecd4f0af1020033702ba9e7236984e542e (diff) | |
download | mediapointer-dvb-s2-dffe9afaabd4c5c3aded53705d5421201d80dc74.tar.gz mediapointer-dvb-s2-dffe9afaabd4c5c3aded53705d5421201d80dc74.tar.bz2 |
Fix BUG in changeset 7157
From: e9hack <e9hack@googlemail.com>
compiling of the current HG tree fails on linux 2.6.24. I think it is a bug in
changeset 7157:
The definition of i2c_verify_client() should not be inside #ifndef BIT_MASK / #endif.
The variable i2c_bus_type is only public on 2.6.23.x (maybe also on
earlier versions) but not on 2.6.24. The following patch does fix the problem
on 2.6.24 for me:
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/compat.h')
-rw-r--r-- | v4l/compat.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 16a6d03b4..581262bdf 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -497,13 +497,16 @@ do { \ #ifndef BIT_MASK # define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) # define BIT_WORD(nr) ((nr) / BITS_PER_LONG) +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) #define i2c_verify_client(dev) \ ((dev->bus == &i2c_bus_type) ? to_i2c_client(dev) : NULL) - +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) +#define i2c_verify_client(dev) \ + ((dev->bus && 0 == strcmp(dev->bus->name, "i2c")) ? to_i2c_client(dev) : NULL) #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 \ |