All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH FOR 3.3] anysee: do not attach same frontend twice
@ 2012-01-15 18:20 Antti Palosaari
  0 siblings, 0 replies; only message in thread
From: Antti Palosaari @ 2012-01-15 18:20 UTC (permalink / raw)
  To: linux-media

cxd2820r implements only one frontend currently which
handles all the standards.

Signed-off-by: Antti Palosaari <crope@iki.fi>
---
  drivers/media/dvb/dvb-usb/anysee.c |   20 +++++++-------------
  1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/anysee.c 
b/drivers/media/dvb/dvb-usb/anysee.c
index df46015..ecc3add 100644
--- a/drivers/media/dvb/dvb-usb/anysee.c
+++ b/drivers/media/dvb/dvb-usb/anysee.c
@@ -877,24 +877,18 @@ static int anysee_frontend_attach(struct 
dvb_usb_adapter *adap)
  	case ANYSEE_HW_508T2C: /* 20 */
  		/* E7 T2C */

+		if (state->fe_id)
+			break;
+
  		/* enable DVB-T/T2/C demod on IOE[5] */
  		ret = anysee_wr_reg_mask(adap->dev, REG_IOE, (1 << 5), 0x20);
  		if (ret)
  			goto error;

-		if (state->fe_id == 0)  {
-			/* DVB-T/T2 */
-			adap->fe_adap[state->fe_id].fe =
-				dvb_attach(cxd2820r_attach,
-				&anysee_cxd2820r_config,
-				&adap->dev->i2c_adap, NULL);
-		} else {
-			/* DVB-C */
-			adap->fe_adap[state->fe_id].fe =
-				dvb_attach(cxd2820r_attach,
-				&anysee_cxd2820r_config,
-				&adap->dev->i2c_adap, adap->fe_adap[0].fe);
-		}
+		/* attach demod */
+		adap->fe_adap[state->fe_id].fe = dvb_attach(cxd2820r_attach,
+				&anysee_cxd2820r_config, &adap->dev->i2c_adap,
+				NULL);

  		state->has_ci = true;

-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-15 18:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-15 18:20 [PATCH FOR 3.3] anysee: do not attach same frontend twice Antti Palosaari

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.