summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7115.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-03-30 01:04:44 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2009-03-30 01:04:44 +0200
commit1784ea5527ed756f946958f45f74d1f15797c366 (patch)
tree8126fc8bf73357835aca910bb3d95be555e7af7e /linux/drivers/media/video/saa7115.c
parent221b2e5d87ca670a9b764323c59445f1b6e3df27 (diff)
downloadmediapointer-dvb-s2-1784ea5527ed756f946958f45f74d1f15797c366.tar.gz
mediapointer-dvb-s2-1784ea5527ed756f946958f45f74d1f15797c366.tar.bz2
v4l2: use old-style i2c API for kernels < 2.6.26 instead of < 2.6.22
From: Hans Verkuil <hverkuil@xs4all.nl> Originally the intention was to switch to the new style i2c API starting with the introduction of the API in 2.6.22. However, the i2c_new_probed_device() function has a lethal bug that wasn't fixed until 2.6.25. Or more accurately, it was only fixed in the stable series of 2.6.25 and 2.6.26. Given the fact that the new i2c API also changed starting with 2.6.26 (the addition of i2c_device_id), it is easiest to switch APIs starting with 2.6.26. This patch updates all the legacy code accordingly. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/saa7115.c')
-rw-r--r--linux/drivers/media/video/saa7115.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c
index a5ae39f35..ea23b7cb1 100644
--- a/linux/drivers/media/video/saa7115.c
+++ b/linux/drivers/media/video/saa7115.c
@@ -63,7 +63,7 @@ module_param(debug, bool, 0644);
MODULE_PARM_DESC(debug, "Debug level (0-1)");
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
static unsigned short normal_i2c[] = {
0x4a >> 1, 0x48 >> 1, /* SAA7111, SAA7111A and SAA7113 */
0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */
@@ -1686,10 +1686,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.name = "saa7115",
.probe = saa711x_probe,
.remove = saa711x_remove,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
.legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+#else
.id_table = saa7115_id,
#endif
};