summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-06-25 13:54:09 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2007-06-25 13:54:09 -0400
commita3d380925e90fee66ded2ebf22616e6dc936638a (patch)
tree5812dc80bee0703959e77a44dc124ed0cea2c209 /linux/drivers/media/video/cx88
parent6a644b15afc4df5051f34d722423ffea9bc681eb (diff)
downloadmediapointer-dvb-s2-a3d380925e90fee66ded2ebf22616e6dc936638a.tar.gz
mediapointer-dvb-s2-a3d380925e90fee66ded2ebf22616e6dc936638a.tar.bz2
cx88-input: cx88_ir_handle_key: convert nested if's to switch..case
From: Michael Krufky <mkrufky@linuxtv.org> In the function, cx88_ir_handle_key: - convert nested if statement to a switch..case block Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r--linux/drivers/media/video/cx88/cx88-input.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c
index b96dbbfb4..8f7f435c6 100644
--- a/linux/drivers/media/video/cx88/cx88-input.c
+++ b/linux/drivers/media/video/cx88/cx88-input.c
@@ -75,7 +75,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.
@@ -91,12 +92,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;