media: mn88473: reset stream ID reg if no PLP given
authorOlli Salonen <olli.salonen@iki.fi>
Sun, 30 Jul 2017 12:34:49 +0000 (08:34 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 27 Aug 2017 22:06:52 +0000 (18:06 -0400)
If the PLP given is NO_STREAM_ID_FILTER (~0u) don't try to set that into the PLP register. Set PLP to 0 instead.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/mn88473.c

index 15874244fd8b2054cc9a4697f7279b77a84b05b7..58247432a6286bd339567afa7a4be03b1d344a81 100644 (file)
@@ -225,7 +225,9 @@ static int mn88473_set_frontend(struct dvb_frontend *fe)
 
        /* PLP */
        if (c->delivery_system == SYS_DVBT2) {
-               ret = regmap_write(dev->regmap[2], 0x36, c->stream_id);
+               ret = regmap_write(dev->regmap[2], 0x36,
+                               (c->stream_id == NO_STREAM_ID_FILTER) ? 0 :
+                               c->stream_id );
                if (ret)
                        goto err;
        }