aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2012-09-29 15:06:23 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-01 16:26:06 -0400
commit4cfae67515ed4c7bf5bb94fde20130153936f465 (patch)
tree0c2c527bea7a30d182f416f0ffd02d8047a3cc92
parent185e4768b864b3b65c5d2cdca9be556d493f15e1 (diff)
[media] tda18271: make 'low-power standby mode after attach' multi-instance safe
Ensure that unnecessary features are powered down at the end of the attach() function on attach of the tuner's first instance. If the configuration requires the loop thru or xtout features, they will remain enabled. This must *only* be done after attaching the first instance of the tuner. If there are multiple instances of the tuner, the bridge driver will need to maintain power managament by itself. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/tuners/tda18271-fe.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/tuners/tda18271-fe.c b/drivers/media/tuners/tda18271-fe.c
index 5f5d866d3fc9..de21197ca4b9 100644
--- a/drivers/media/tuners/tda18271-fe.c
+++ b/drivers/media/tuners/tda18271-fe.c
@@ -1285,6 +1285,10 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
1285 (priv->id == TDA18271HDC2)) 1285 (priv->id == TDA18271HDC2))
1286 tda18271c2_rf_cal_init(fe); 1286 tda18271c2_rf_cal_init(fe);
1287 1287
1288 /* enter standby mode, with required output features enabled */
1289 ret = tda18271_toggle_output(fe, 1);
1290 tda_fail(ret);
1291
1288 mutex_unlock(&priv->lock); 1292 mutex_unlock(&priv->lock);
1289 break; 1293 break;
1290 default: 1294 default:
@@ -1323,9 +1327,6 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
1323 if (tda18271_debug & (DBG_MAP | DBG_ADV)) 1327 if (tda18271_debug & (DBG_MAP | DBG_ADV))
1324 tda18271_dump_std_map(fe); 1328 tda18271_dump_std_map(fe);
1325 1329
1326 ret = tda18271_sleep(fe);
1327 tda_fail(ret);
1328
1329 return fe; 1330 return fe;
1330fail: 1331fail:
1331 mutex_unlock(&tda18271_list_mutex); 1332 mutex_unlock(&tda18271_list_mutex);