From c6e23701f557c5368f66922f12d7c642efbd277c Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 25 Jun 2007 14:54:09 -0300 Subject: [PATCH] --- yaml --- r: 61343 b: refs/heads/master c: 829ea96477e775df0698b54dbfa913b6b55a4d6d h: refs/heads/master i: 61341: de0e19c1d10a8a0dc81a1903ddf1e7bf7ecba2a0 61339: 9cb545b22f20b7967c57fd8efe5a560f1dabc94f 61335: 0ebdca7608c77267a4a43d1ca8fecf3048187ad7 61327: 02349a1abdf4f18ed64f234aebd8faf674de4e17 61311: f1606b5d28cece44767b74687b5481d01b687af7 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/cx88/cx88-input.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index efb9f2154bf3..30617c9c6e5e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e7d11ecbde987e56845cff012b4a28d7001667b8 +refs/heads/master: 829ea96477e775df0698b54dbfa913b6b55a4d6d diff --git a/trunk/drivers/media/video/cx88/cx88-input.c b/trunk/drivers/media/video/cx88/cx88-input.c index 22cbdf2f0fdd..f5d4a565346e 100644 --- a/trunk/drivers/media/video/cx88/cx88-input.c +++ b/trunk/drivers/media/video/cx88/cx88-input.c @@ -74,7 +74,8 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) /* read gpio value */ gpio = cx_read(ir->gpio_addr); - if (core->board == CX88_BOARD_NPGTECH_REALTV_TOP10FM) { + switch (core->board) { + case CX88_BOARD_NPGTECH_REALTV_TOP10FM: /* This board apparently uses a combination of 2 GPIO to represent the keys. Additionally, the second GPIO can be used for parity. @@ -90,12 +91,14 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) auxgpio = cx_read(MO_GP1_IO); /* Take out the parity part */ gpio=(gpio & 0x7fd) + (auxgpio & 0xef); - } else if (core->board == CX88_BOARD_WINFAST_DTV1000) { + break; + case CX88_BOARD_WINFAST_DTV1000: gpio = (gpio & 0x6ff) | ((cx_read(MO_GP1_IO) << 8) & 0x900); auxgpio = gpio; - } else + break; + default: auxgpio = gpio; - + } if (ir->polling) { if (ir->last_gpio == auxgpio) return;