Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6b7daa88f23bb23f61977063e3f8ea9598e65e32
Commit:     6b7daa88f23bb23f61977063e3f8ea9598e65e32
Parent:     2b03238a79295aff30afc3d9a82afa617fd33971
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 13 10:11:49 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:03:45 2008 -0200

    V4L/DVB (6822): s5h1409: use VSB IF frequency ( 44 / 5.38 MHz ) unless 
otherwise specified
    
    use VSB IF frequency ( 44 / 5.38 MHz ) if qam_if is invalid or unspecified
    
    Acked-by: Steven Toth <[EMAIL PROTECTED]>
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/frontends/s5h1409.c |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/media/dvb/frontends/s5h1409.c 
b/drivers/media/dvb/frontends/s5h1409.c
index b80a3ee..d3b148d 100644
--- a/drivers/media/dvb/frontends/s5h1409.c
+++ b/drivers/media/dvb/frontends/s5h1409.c
@@ -355,28 +355,26 @@ static int s5h1409_softreset(struct dvb_frontend* fe)
 static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz)
 {
        struct s5h1409_state* state = fe->demodulator_priv;
-       int ret = 0;
 
        dprintk("%s(%d KHz)\n", __FUNCTION__, KHz);
 
-       if( (KHz == 44000) || (KHz == 5380) ) {
-               s5h1409_writereg(state, 0x87, 0x01be);
-               s5h1409_writereg(state, 0x88, 0x0436);
-               s5h1409_writereg(state, 0x89, 0x054d);
-       } else
-       if (KHz == 4000) {
+       switch (KHz) {
+       case 4000:
                s5h1409_writereg(state, 0x87, 0x014b);
                s5h1409_writereg(state, 0x88, 0x0cb5);
                s5h1409_writereg(state, 0x89, 0x03e2);
-       } else {
-               printk("%s() Invalid arg = %d KHz\n", __FUNCTION__, KHz);
-               ret = -1;
+               break;
+       case 5380:
+       case 44000:
+       default:
+               s5h1409_writereg(state, 0x87, 0x01be);
+               s5h1409_writereg(state, 0x88, 0x0436);
+               s5h1409_writereg(state, 0x89, 0x054d);
+               break;
        }
+       state->if_freq = KHz;
 
-       if (0 == ret)
-               state->if_freq = KHz;
-
-       return ret;
+       return 0;
 }
 
 static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted)
-
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