diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-27 15:32:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-27 15:32:23 -0300 |
commit | 9c9fd460173573929daf32f42a502283a9aaae26 (patch) | |
tree | a6b7c0cc7cbb0789f837508394263ccaf1df31ca /linux/drivers/media/video/em28xx/em28xx-input.c | |
parent | fa6bf06d0bc8a417de4d20da09191a12baf5b6a4 (diff) | |
download | mediapointer-dvb-s2-9c9fd460173573929daf32f42a502283a9aaae26.tar.gz mediapointer-dvb-s2-9c9fd460173573929daf32f42a502283a9aaae26.tar.bz2 |
Building system: Restore compilation with kernels older than 2.6.29
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Mostly due to ir-kdb-i2c, but also due to two new drivers, compilation
with kernels older than 2.6.29 were broken.
This quick and dirty changeset, generated semi-automatically, restaures
backport to the subsystem by adding lots of #ifs.
It is possible to write a much more small changeset that would restore
backport without adding so many ifs, but, due to the lack of time, this
will also solve it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-input.c')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-input.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-input.c b/linux/drivers/media/video/em28xx/em28xx-input.c index bfe2cb8f6..df58b4c5b 100644 --- a/linux/drivers/media/video/em28xx/em28xx-input.c +++ b/linux/drivers/media/video/em28xx/em28xx-input.c @@ -86,7 +86,11 @@ int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) unsigned char b; /* poll IR chip */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + if (1 != i2c_master_recv(&ir->c, &b, 1)) { +#else if (1 != i2c_master_recv(ir->c, &b, 1)) { +#endif i2cdprintk("read error\n"); return -EIO; } @@ -115,7 +119,11 @@ int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) unsigned char code; /* poll IR chip */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + if (2 != i2c_master_recv(&ir->c, buf, 2)) +#else if (2 != i2c_master_recv(ir->c, buf, 2)) +#endif return -EIO; /* Does eliminate repeated parity code */ @@ -153,7 +161,11 @@ int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, /* poll IR chip */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + if (3 != i2c_master_recv(&ir->c, buf, 3)) { +#else if (3 != i2c_master_recv(ir->c, buf, 3)) { +#endif i2cdprintk("read error\n"); return -EIO; } |