aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index c3b5cfa13b60..8f9203e7d3b8 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -696,10 +696,6 @@ void saa7134_input_fini(struct saa7134_dev *dev)
696void saa7134_probe_i2c_ir(struct saa7134_dev *dev) 696void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
697{ 697{
698 struct i2c_board_info info; 698 struct i2c_board_info info;
699 const unsigned short addr_list[] = {
700 0x47, 0x71, 0x2d,
701 I2C_CLIENT_END
702 };
703 699
704 struct i2c_msg msg_msi = { 700 struct i2c_msg msg_msi = {
705 .addr = 0x50, 701 .addr = 0x50,
@@ -757,6 +753,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
757 dev->init_data.name = "HVR 1110"; 753 dev->init_data.name = "HVR 1110";
758 dev->init_data.get_key = get_key_hvr1110; 754 dev->init_data.get_key = get_key_hvr1110;
759 dev->init_data.ir_codes = &ir_codes_hauppauge_new_table; 755 dev->init_data.ir_codes = &ir_codes_hauppauge_new_table;
756 info.addr = 0x71;
760 break; 757 break;
761 case SAA7134_BOARD_BEHOLD_607FM_MK3: 758 case SAA7134_BOARD_BEHOLD_607FM_MK3:
762 case SAA7134_BOARD_BEHOLD_607FM_MK5: 759 case SAA7134_BOARD_BEHOLD_607FM_MK5:
@@ -774,23 +771,20 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
774 dev->init_data.name = "BeholdTV"; 771 dev->init_data.name = "BeholdTV";
775 dev->init_data.get_key = get_key_beholdm6xx; 772 dev->init_data.get_key = get_key_beholdm6xx;
776 dev->init_data.ir_codes = &ir_codes_behold_table; 773 dev->init_data.ir_codes = &ir_codes_behold_table;
774 info.addr = 0x2d;
777 break; 775 break;
778 case SAA7134_BOARD_AVERMEDIA_CARDBUS_501: 776 case SAA7134_BOARD_AVERMEDIA_CARDBUS_501:
779 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: 777 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
780 info.addr = 0x40; 778 info.addr = 0x40;
781 break; 779 break;
780 default:
781 dprintk("No I2C IR support for board %x\n", dev->board);
782 return;
782 } 783 }
783 784
784 if (dev->init_data.name) 785 if (dev->init_data.name)
785 info.platform_data = &dev->init_data; 786 info.platform_data = &dev->init_data;
786 /* No need to probe if address is known */ 787 i2c_new_device(&dev->i2c_adap, &info);
787 if (info.addr) {
788 i2c_new_device(&dev->i2c_adap, &info);
789 return;
790 }
791
792 /* Address not known, fallback to probing */
793 i2c_new_probed_device(&dev->i2c_adap, &info, addr_list);
794} 788}
795 789
796static int saa7134_rc5_irq(struct saa7134_dev *dev) 790static int saa7134_rc5_irq(struct saa7134_dev *dev)