From patchwork Mon Aug 16 02:31:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Drung X-Patchwork-Id: 61803 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 8BF1DB70E9 for ; Mon, 16 Aug 2010 22:28:38 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1Okynp-0008Ef-Q0; Mon, 16 Aug 2010 13:28:33 +0100 Received: from mail-ey0-f177.google.com ([209.85.215.177]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OkpTd-00070s-2b for kernel-team@lists.ubuntu.com; Mon, 16 Aug 2010 03:31:05 +0100 Received: by eye22 with SMTP id 22so854018eye.8 for ; Sun, 15 Aug 2010 19:31:04 -0700 (PDT) Received: by 10.213.39.196 with SMTP id h4mr4289812ebe.42.1281925864436; Sun, 15 Aug 2010 19:31:04 -0700 (PDT) Received: from localhost (77-22-116-243-dynip.superkabel.de [77.22.116.243]) by mx.google.com with ESMTPS id z55sm9116037eeh.3.2010.08.15.19.31.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 15 Aug 2010 19:31:03 -0700 (PDT) From: bdrung@ubuntu.com To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: [Upstream] lirc - Fix Hauppauge TV Card is detected as Leadtek IR Date: Mon, 16 Aug 2010 04:31:02 +0200 Message-Id: <1281925862-6034-1-git-send-email-bdrung@ubuntu.com> X-Mailer: git-send-email 1.7.0.4 X-Mailman-Approved-At: Mon, 16 Aug 2010 13:28:29 +0100 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Benjamin Drung OriginalLocation: http://lirc.cvs.sourceforge.net/viewvc/lirc/lirc/drivers/lirc_i2c/lirc_i2c.c?r1=1.71&r2=1.72 BugLink: http://bugs.launchpad.net/bugs/550369 Signed-off-by: Benjamin Drung --- ubuntu/lirc/lirc_i2c/lirc_i2c.c | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/ubuntu/lirc/lirc_i2c/lirc_i2c.c b/ubuntu/lirc/lirc_i2c/lirc_i2c.c index dca6b51..2db5a64 100644 --- a/ubuntu/lirc/lirc_i2c/lirc_i2c.c +++ b/ubuntu/lirc/lirc_i2c/lirc_i2c.c @@ -491,20 +491,23 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ir->l.add_to_buf = add_to_buf_pv951; break; case 0x71: -#ifdef I2C_HW_B_CX2341X - if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848) || - adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2341X)) { -#else - if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) { + + + +#ifdef I2C_HW_B_CX2388x + /* Leadtek Winfast PVR2000 or Hauppauge HVR-1300 */ + if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x)) + strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE); + else #endif + { /* * The PVR150 IR receiver uses the same protocol as * other Hauppauge cards, but the data flow is * different, so we need to deal with it by its own. */ strlcpy(ir->c.name, "Hauppauge PVR150", I2C_NAME_SIZE); - } else /* I2C_HW_B_CX2388x */ - strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE); + } ir->l.code_length = 13; ir->l.add_to_buf = add_to_buf_haup_pvr150; break; @@ -515,19 +518,18 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) break; case 0x18: case 0x1a: -#ifdef I2C_HW_B_CX2341X - if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848) || - adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2341X)) { +#ifdef I2C_HW_B_CX2388x + if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_CX2388x)) { + strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE); + ir->l.code_length = 8; + ir->l.add_to_buf = add_to_buf_pvr2000; + } else { #else - if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) { + { #endif strlcpy(ir->c.name, "Hauppauge IR", I2C_NAME_SIZE); ir->l.code_length = 13; ir->l.add_to_buf = add_to_buf_haup; - } else { /* I2C_HW_B_CX2388x */ - strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE); - ir->l.code_length = 8; - ir->l.add_to_buf = add_to_buf_pvr2000; } break; case 0x30: