V4L/DVB (13845): smsdvb: Fix the frequency switch that broke with v5 API conversion
authorMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 25 Dec 2009 10:29:06 +0000 (07:29 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:26 +0000 (15:10 -0300)
Bandwidth is in Hz, not in kHz.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/siano/smsdvb.c

index 36f886768aa38a91c1194c003017e9a23d841319..2f675cda94748fc6f8d0a298d7363febc5794c64 100644 (file)
@@ -507,7 +507,7 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe,
        sms_info("%s: freq %d band %d", __func__, c->frequency,
                 c->bandwidth_hz);
 
-       switch (c->bandwidth_hz / 1000) {
+       switch (c->bandwidth_hz / 1000000) {
        case 8:
                Msg.Data[1] = BW_8_MHZ;
                break;
@@ -575,7 +575,7 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe,
                Msg.Data[1] = BW_ISDBT_1SEG;
                break;
        case 0: /* AUTO */
-               switch (c->bandwidth_hz / 1000) {
+               switch (c->bandwidth_hz / 1000000) {
                case 8:
                case 7:
                        c->isdbt_sb_segment_count = 3;