[media] drx-j: call ctrl_set_standard even if a standard is powered
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 26 Jan 2014 18:39:06 +0000 (15:39 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 4 Mar 2014 17:37:09 +0000 (14:37 -0300)
Modulation and other parameters might have changed. So, better
to call ctrl_set_standard() even if the device is already
powered.

That helps to put the device into a sane state, if something
got wrong on a previous set_frontend call.

Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/drx39xyj/drxj.c

index 7f17cd1..b1a7dfe 100644 (file)
@@ -20213,18 +20213,15 @@ static int drx39xxj_set_frontend(struct dvb_frontend *fe)
        default:
                return -EINVAL;
        }
-
-       if (standard != state->current_standard || state->powered_up == 0) {
-               /* Set the standard (will be powered up if necessary */
-               result = ctrl_set_standard(demod, &standard);
-               if (result != 0) {
-                       pr_err("Failed to set standard! result=%02x\n",
-                              result);
-                       return -EINVAL;
-               }
-               state->powered_up = 1;
-               state->current_standard = standard;
+       /* Set the standard (will be powered up if necessary */
+       result = ctrl_set_standard(demod, &standard);
+       if (result != 0) {
+               pr_err("Failed to set standard! result=%02x\n",
+                       result);
+               return -EINVAL;
        }
+       state->powered_up = 1;
+       state->current_standard = standard;
 
        /* set channel parameters */
        channel = def_channel;