From: Mauro Carvalho Chehab Date: Tue, 22 Apr 2008 17:45:28 +0000 (-0300) Subject: V4L/DVB (7263): Some cleanups at cx88 callback methods X-Git-Tag: v2.6.26-rc1~1084^2~389 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c450e50e8d6a0876431a744f1df9fdd5c2732b07;p=karo-tx-linux.git V4L/DVB (7263): Some cleanups at cx88 callback methods Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 1fe6b9da9815..fc870882ffe2 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c @@ -2062,34 +2062,22 @@ static int cx88_xc3028_geniatech_tuner_callback(void *priv, int command, int mod case XC2028_TUNER_RESET: switch (INPUT(core->input).type) { case CX88_RADIO: - cx_write(MO_GP1_IO, 0x101010); - mdelay(50); - cx_write(MO_GP1_IO, 0x101000); - mdelay(50); - cx_write(MO_GP1_IO, 0x101010); - mdelay(50); - return 0; + break; case CX88_VMUX_DVB: cx_write(MO_GP1_IO, 0x030302); mdelay(50); - cx_write(MO_GP1_IO, 0x101010); - mdelay(50); - cx_write(MO_GP1_IO, 0x101000); - mdelay(50); - cx_write(MO_GP1_IO, 0x101010); - mdelay(50); - return 0; + break; default: cx_write(MO_GP1_IO, 0x030301); mdelay(50); - cx_write(MO_GP1_IO, 0x101010); - mdelay(50); - cx_write(MO_GP1_IO, 0x101000); - mdelay(50); - cx_write(MO_GP1_IO, 0x101010); - mdelay(50); - return 0; - } + } + cx_write(MO_GP1_IO, 0x101010); + mdelay(50); + cx_write(MO_GP1_IO, 0x101000); + mdelay(50); + cx_write(MO_GP1_IO, 0x101010); + mdelay(50); + return 0; } return -EINVAL; } @@ -2145,7 +2133,6 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg) switch (command) { case XC2028_TUNER_RESET: - { switch (INPUT(core->input).type) { case CX88_RADIO: printk(KERN_INFO "setting GPIO to radio!\n"); @@ -2153,25 +2140,19 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg) mdelay(250); cx_write(MO_GP2_IO, 0xff); mdelay(250); - cx_write(MO_GP1_IO, 0x101010); - mdelay(250); - cx_write(MO_GP1_IO, 0x101000); - mdelay(250); - cx_write(MO_GP1_IO, 0x101010); - mdelay(250); - return 0; + break; case CX88_VMUX_DVB: /* Digital TV*/ default: /* Analog TV */ printk(KERN_INFO "setting GPIO to TV!\n"); - cx_write(MO_GP1_IO, 0x101010); - mdelay(250); - cx_write(MO_GP1_IO, 0x101000); - mdelay(250); - cx_write(MO_GP1_IO, 0x101010); - mdelay(250); - return 0; + break; } - } + cx_write(MO_GP1_IO, 0x101010); + mdelay(250); + cx_write(MO_GP1_IO, 0x101000); + mdelay(250); + cx_write(MO_GP1_IO, 0x101010); + mdelay(250); + return 0; } return -EINVAL; }