Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=829ea96477e775df0698b54dbfa913b6b55a4d6d
Commit:     829ea96477e775df0698b54dbfa913b6b55a4d6d
Parent:     e7d11ecbde987e56845cff012b4a28d7001667b8
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 25 14:54:09 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 14:24:20 2007 -0300

    V4L/DVB (5788): Cx88-input: convert nested if's to switch..case
    
    In the function, cx88_ir_handle_key:
    - convert nested if statement to a switch..case block
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/cx88/cx88-input.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-input.c 
b/drivers/media/video/cx88/cx88-input.c
index 22cbdf2..f5d4a56 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to