diff mbox

saa7134: Complete the IR address list

Message ID 20091002144804.56b0b908@hyperion.delvare (mailing list archive)
State Accepted
Headers show

Commit Message

Jean Delvare Oct. 2, 2009, 12:48 p.m. UTC
None
diff mbox

Patch

--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-input.c	2009-10-02 13:50:12.000000000 +0200
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-input.c	2009-10-02 14:29:07.000000000 +0200
@@ -746,10 +746,6 @@  void saa7134_probe_i2c_ir(struct saa7134
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
 	struct i2c_board_info info;
-	const unsigned short addr_list[] = {
-		0x47, 0x71, 0x2d,
-		I2C_CLIENT_END
-	};
 
 	struct i2c_msg msg_msi = {
 		.addr = 0x50,
@@ -846,6 +842,7 @@  void saa7134_probe_i2c_ir(struct saa7134
 		dev->init_data.name = "HVR 1110";
 		dev->init_data.get_key = get_key_hvr1110;
 		dev->init_data.ir_codes = &ir_codes_hauppauge_new_table;
+		info.addr = 0x71;
 #endif
 		break;
 	case SAA7134_BOARD_BEHOLD_607FM_MK3:
@@ -869,30 +866,24 @@  void saa7134_probe_i2c_ir(struct saa7134
 		dev->init_data.name = "BeholdTV";
 		dev->init_data.get_key = get_key_beholdm6xx;
 		dev->init_data.ir_codes = &ir_codes_behold_table;
+		info.addr = 0x2d;
 #endif
 		break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
-	default:
-		dprintk("Shouldn't get here: Unknown board %x for I2C IR?\n",dev->board);
-#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
 	case SAA7134_BOARD_AVERMEDIA_CARDBUS_501:
 	case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
 		info.addr = 0x40;
-#endif
 		break;
+#endif
+	default:
+		dprintk("No I2C IR support for board %x\n", dev->board);
+		return;
 	}
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
 	if (dev->init_data.name)
 		info.platform_data = &dev->init_data;
-	/* No need to probe if address is known */
-	if (info.addr) {
-		i2c_new_device(&dev->i2c_adap, &info);
-		return;
-	}
-
-	/* Address not known, fallback to probing */
-	i2c_new_probed_device(&dev->i2c_adap, &info, addr_list);
+	i2c_new_device(&dev->i2c_adap, &info);
 #endif
 }