summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-26 15:39:06 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-04 14:37:09 -0300
commitc4dc6f9222a621c1d1f44120590093d2d58441d4 (patch)
tree9e44c28466d13ea93ce4f55ad6f5fe4f50f8939e
parentc76286bafc682740a3c83aebeacb2d304bd39184 (diff)
downloadop-kernel-dev-c4dc6f9222a621c1d1f44120590093d2d58441d4.zip
op-kernel-dev-c4dc6f9222a621c1d1f44120590093d2d58441d4.tar.gz
[media] drx-j: call ctrl_set_standard even if a standard is powered
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>
-rw-r--r--drivers/media/dvb-frontends/drx39xyj/drxj.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index 7f17cd1..b1a7dfe 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -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;
OpenPOWER on IntegriCloud