summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-input.c')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-input.c12
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;
}