Return-path: Received: from mx1.redhat.com ([209.132.183.28]:16742 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753822Ab1L0BJm (ORCPT ); Mon, 26 Dec 2011 20:09:42 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBR19flb017900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 26 Dec 2011 20:09:41 -0500 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List Subject: [PATCH RFC 62/91] [media] nxt200x: convert set_fontend to use DVBv5 parameters Date: Mon, 26 Dec 2011 23:08:50 -0200 Message-Id: <1324948159-23709-63-git-send-email-mchehab@redhat.com> In-Reply-To: <1324948159-23709-62-git-send-email-mchehab@redhat.com> References: <1324948159-23709-1-git-send-email-mchehab@redhat.com> <1324948159-23709-2-git-send-email-mchehab@redhat.com> <1324948159-23709-3-git-send-email-mchehab@redhat.com> <1324948159-23709-4-git-send-email-mchehab@redhat.com> <1324948159-23709-5-git-send-email-mchehab@redhat.com> <1324948159-23709-6-git-send-email-mchehab@redhat.com> <1324948159-23709-7-git-send-email-mchehab@redhat.com> <1324948159-23709-8-git-send-email-mchehab@redhat.com> <1324948159-23709-9-git-send-email-mchehab@redhat.com> <1324948159-23709-10-git-send-email-mchehab@redhat.com> <1324948159-23709-11-git-send-email-mchehab@redhat.com> <1324948159-23709-12-git-send-email-mchehab@redhat.com> <1324948159-23709-13-git-send-email-mchehab@redhat.com> <1324948159-23709-14-git-send-email-mchehab@redhat.com> <1324948159-23709-15-git-send-email-mchehab@redhat.com> <1324948159-23709-16-git-send-email-mchehab@redhat.com> <1324948159-23709-17-git-send-email-mchehab@redhat.com> <1324948159-23709-18-git-send-email-mchehab@redhat.com> <1324948159-23709-19-git-send-email-mchehab@redhat.com> <1324948159-23709-20-git-send-email-mchehab@redhat.com> <1324948159-23709-21-git-send-email-mchehab@redhat.com> <1324948159-23709-22-git-send-email-mchehab@redhat.com> <1324948159-23709-23-git-send-email-mchehab@redhat.com> <1324948159-23709-24-git-send-email-mchehab@redhat.com> <1324948159-23709-25-git-send-email-mchehab@redhat.com> <1324948159-23709-26-git-send-email-mchehab@redhat.com> <1324948159-23709-27-git-send-email-mchehab@redhat.com> <1324948159-23709-28-git-send-email-mchehab@redhat.com> <1324948159-23709-29-git-send-email-mchehab@redhat.com> <1324948159-23709-30-git-send-email-mchehab@redhat.com> <1324948159-23709-31-git-send-email-mchehab@redhat.com> <1324948159-23709-32-git-send-email-mchehab@redhat.com> <1324948159-23709-33-git-send-email-mchehab@redhat.com> <1324948159-23709-34-git-send-email-mchehab@redhat.com> <1324948159-23709-35-git-send-email-mchehab@redhat.com> <1324948159-23709-36-git-send-email-mchehab@redhat.com> <1324948159-23709-37-git-send-email-mchehab@redhat.com> <1324948159-23709-38-git-send-email-mchehab@redhat.com> <1324948159-23709-39-git-send-email-mchehab@redhat.com> <1324948159-23709-40-git-send-email-mchehab@redhat.com> <1324948159-23709-41-git-send-email-mchehab@redhat.com> <1324948159-23709-42-git-send-email-mchehab@redhat.com> <1324948159-23709-43-git-send-email-mchehab@redhat.com> <1324948159-23709-44-git-send-email-mchehab@redhat.com> <1324948159-23709-45-git-send-email-mchehab@redhat.com> <1324948159-23709-46-git-send-email-mchehab@redhat.com> <1324948159-23709-47-git-send-email-mchehab@redhat.com> <1324948159-23709-48-git-send-email-mchehab@redhat.com> <1324948159-23709-49-git-send-email-mchehab@redhat.com> <1324948159-23709-50-git-send-email-mchehab@redhat.com> <1324948159-23709-51-git-send-email-mchehab@redhat.com> <1324948159-23709-52-git-send-email-mchehab@redhat.com> <1324948159-23709-53-git-send-email-mchehab@redhat.com> <1324948159-23709-54-git-send-email-mchehab@redhat.com> <1324948159-23709-55-git-send-email-mchehab@redhat.com> <1324948159-23709-56-git-send-email-mchehab@redhat.com> <1324948159-23709-57-git-send-email-mchehab@redhat.com> <1324948159-23709-58-git-send-email-mchehab@redhat.com> <1324948159-23709-59-git-send-email-mchehab@redhat.com> <1324948159-23709-60-git-send-email-mchehab@redhat.com> <1324948159-23709-61-git-send-email-mchehab@redhat.com> <1324948159-23709-62-git-send-email-mchehab@redhat.com> To: unlisted-recipients:; (no To-header on input)@canuck.infradead.org Sender: linux-media-owner@vger.kernel.org List-ID: Instead of using dvb_frontend_parameters struct, that were designed for a subset of the supported standards, use the DVBv5 cache information. Also, fill the supported delivery systems at dvb_frontend_ops struct. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/nxt200x.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c index efb8e46..b541614 100644 --- a/drivers/media/dvb/frontends/nxt200x.c +++ b/drivers/media/dvb/frontends/nxt200x.c @@ -528,9 +528,9 @@ static int nxt2004_load_firmware (struct dvb_frontend* fe, const struct firmware return 0; }; -static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, - struct dvb_frontend_parameters *p) +static int nxt200x_setup_frontend_parameters(struct dvb_frontend *fe) { + struct dtv_frontend_properties *p = &fe->dtv_property_cache; struct nxt200x_state* state = fe->demodulator_priv; u8 buf[5]; @@ -546,7 +546,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, } /* set additional params */ - switch (p->u.vsb.modulation) { + switch (p->modulation) { case QAM_64: case QAM_256: /* Set punctured clock for QAM */ @@ -576,7 +576,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, nxt200x_agc_reset(state); /* set target power level */ - switch (p->u.vsb.modulation) { + switch (p->modulation) { case QAM_64: case QAM_256: buf[0] = 0x74; @@ -620,7 +620,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, } /* write sdmx input */ - switch (p->u.vsb.modulation) { + switch (p->modulation) { case QAM_64: buf[0] = 0x68; break; @@ -714,7 +714,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, } /* write agc ucgp0 */ - switch (p->u.vsb.modulation) { + switch (p->modulation) { case QAM_64: buf[0] = 0x02; break; @@ -1203,7 +1203,7 @@ error: } static struct dvb_frontend_ops nxt200x_ops = { - + .delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B }, .info = { .name = "Nextwave NXT200X VSB/QAM frontend", .type = FE_ATSC, @@ -1220,7 +1220,7 @@ static struct dvb_frontend_ops nxt200x_ops = { .init = nxt200x_init, .sleep = nxt200x_sleep, - .set_frontend_legacy = nxt200x_setup_frontend_parameters, + .set_frontend = nxt200x_setup_frontend_parameters, .get_tune_settings = nxt200x_get_tune_settings, .read_status = nxt200x_read_status, -- 1.7.8.352.g876a6