summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/b2c2
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-25 09:07:00 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-25 09:07:00 -0200
commit564d21054d1f61d9448a93b3fa8a254a29713d26 (patch)
tree7ffc11b46383ff01ce60cb9c454b0938facb05ad /linux/drivers/media/dvb/b2c2
parent6941ff312bc3df2578143871566980c02dade212 (diff)
downloadmediapointer-dvb-s2-564d21054d1f61d9448a93b3fa8a254a29713d26.tar.gz
mediapointer-dvb-s2-564d21054d1f61d9448a93b3fa8a254a29713d26.tar.bz2
fix boards for kernels with algo_control
From: Mauro Carvalho Chehab <mchehab@redhat.com> changeset 4ecae6da8244 removed algo_control from i2c drivers. However, on older kernels, a dummy function to implement algo_control is required, otherwise, an OOPS is generated. This patch adds a backport for all i2c drivers that defines an i2c_algorithm, except for cafe_ccic, since OLPC hardware only works for kernels newer than 2.6.19. Some of the backported drivers would need also extra changes to work with older kernels, as specified on v4l/versions.txt. Yet, I decided to add the backport for those drivers also, since the lack of algo_control doesn't generate any compilation error, but it is enough to break the driver. So, better to all for all boards than to allow compiling a kernel backported that just generates OOPS. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/dvb/b2c2')
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-i2c.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c
index 43a112ec6..05635c453 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c
@@ -205,6 +205,9 @@ static u32 flexcop_i2c_func(struct i2c_adapter *adapter)
static struct i2c_algorithm flexcop_algo = {
.master_xfer = flexcop_master_xfer,
.functionality = flexcop_i2c_func,
+#ifdef NEED_ALGO_CONTROL
+ .algo_control = dummy_algo_control,
+#endif
};
int flexcop_i2c_init(struct flexcop_device *fc)