From patchwork Fri Oct 2 12:48:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 51359 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n92Cm9oe010810 for ; Fri, 2 Oct 2009 12:48:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757055AbZJBMsE (ORCPT ); Fri, 2 Oct 2009 08:48:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756890AbZJBMsD (ORCPT ); Fri, 2 Oct 2009 08:48:03 -0400 Received: from bamako.nerim.net ([62.4.17.28]:55393 "EHLO bamako.nerim.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756825AbZJBMsD (ORCPT ); Fri, 2 Oct 2009 08:48:03 -0400 Received: from localhost (localhost [127.0.0.1]) by bamako.nerim.net (Postfix) with ESMTP id B5F9439DE4A for ; Fri, 2 Oct 2009 14:48:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at nerim.net Received: from bamako.nerim.net ([127.0.0.1]) by localhost (bamako.nerim.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MueeN84BqOBX for ; Fri, 2 Oct 2009 14:48:02 +0200 (CEST) Received: from hyperion.delvare (jdelvare.pck.nerim.net [62.212.121.182]) by bamako.nerim.net (Postfix) with ESMTP id 96F5239DE5A for ; Fri, 2 Oct 2009 14:48:02 +0200 (CEST) Date: Fri, 2 Oct 2009 14:48:04 +0200 From: Jean Delvare To: LMML Subject: [PATCH] saa7134: Complete the IR address list Message-ID: <20091002144804.56b0b908@hyperion.delvare> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; i586-suse-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org --- 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 }