summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-05-13 19:52:44 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-05-13 19:52:44 +0000
commitd7c1afcf9e6a72c1c7b85032e33a4a45091694b6 (patch)
tree9e263095f4766868cbd95309fee964c6a6865cf7 /linux/drivers/media/video
parent39c428638134709e9d5d9d135db22ff39967175d (diff)
downloadmediapointer-dvb-s2-d7c1afcf9e6a72c1c7b85032e33a4a45091694b6.tar.gz
mediapointer-dvb-s2-d7c1afcf9e6a72c1c7b85032e33a4a45091694b6.tar.bz2
saa7134: Simplify handling of IR on AVerMedia Cardbus E506R
From: Jean Delvare <khali@linux-fr.org> Now that we instantiate I2C IR devices explicitly, we can skip probing altogether on boards where the I2C IR device address is known. The AVerMedia Cardbus E506R is one of these boards. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Oldrich Jedlicka <oldium.pro@seznam.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index 3dc600631..36913d22b 100644
--- a/linux/drivers/media/video/saa7134/saa7134-input.c
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c
@@ -702,20 +702,6 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
.buf = NULL,
};
- unsigned char subaddr, data;
- struct i2c_msg msg_avermedia[] = { {
- .addr = 0x40,
- .flags = 0,
- .len = 1,
- .buf = &subaddr,
- }, {
- .addr = 0x40,
- .flags = I2C_M_RD,
- .len = 1,
- .buf = &data,
- } };
-
- struct i2c_client *client;
int rc;
if (disable_ir) {
@@ -779,6 +765,10 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
init_data.get_key = get_key_beholdm6xx;
init_data.ir_codes = ir_codes_behold;
break;
+ case SAA7134_BOARD_AVERMEDIA_CARDBUS_501:
+ case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
+ info.addr = 0x40;
+ break;
}
if (init_data.name)
@@ -790,20 +780,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
}
/* Address not known, fallback to probing */
- client = i2c_new_probed_device(&dev->i2c_adap, &info, addr_list);
- if (client)
- return;
-
- /* Special case for AVerMedia Cardbus remote */
- subaddr = 0x0d;
- rc = i2c_transfer(&dev->i2c_adap, msg_avermedia, 2);
- dprintk(KERN_DEBUG "probe 0x%02x/0x%02x @ %s: %s\n",
- msg_avermedia[0].addr, subaddr, dev->i2c_adap.name,
- (2 == rc) ? "yes" : "no");
- if (2 == rc) {
- info.addr = msg_avermedia[0].addr;
- i2c_new_device(&dev->i2c_adap, &info);
- }
+ i2c_new_probed_device(&dev->i2c_adap, &info, addr_list);
}
static int saa7134_rc5_irq(struct saa7134_dev *dev)