Skip to content

Commit

Permalink
[media] Don't test for ops->info.type inside drivers
Browse files Browse the repository at this point in the history
Now, ops->info.type is handled inside the dvb_frontend
core, only for DVBv3 calls, and according with the
delivery system. So, drivers should not care or use it,
otherwise, it may have issues with DVBv5 calls.

The drivers that were still using it were detected via
this small temporary hack:

--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -29,13 +29,16 @@
 #include <linux/types.h>

 typedef enum fe_type {
+#if defined(__DVB_CORE__) || !defined (__KERNEL__)
        FE_QPSK,
        FE_QAM,
        FE_OFDM,
        FE_ATSC
+#else
+FE_FOOO
+#endif
 } fe_type_t;

-
 typedef enum fe_caps {
        FE_IS_STUPID                    = 0,
        FE_CAN_INVERSION_AUTO           = 0x1,

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jan 5, 2012
1 parent 534e048 commit 6225f18
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 6 additions & 1 deletion drivers/media/common/tuners/tda827x.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,14 @@ static int tda827xa_set_params(struct dvb_frontend *fe)
}
tuner_freq = c->frequency;

if (fe->ops.info.type == FE_QAM) {
switch (c->delivery_system) {
case SYS_DVBC_ANNEX_A:
case SYS_DVBC_ANNEX_C:
dprintk("%s select tda827xa_dvbc\n", __func__);
frequency_map = tda827xa_dvbc;
break;
default:
break;
}

i = 0;
Expand Down
6 changes: 1 addition & 5 deletions drivers/media/dvb/firewire/firedtv-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ void fdtv_frontend_init(struct firedtv *fdtv, const char *name)
switch (fdtv->type) {
case FIREDTV_DVB_S:
ops->delsys[0] = SYS_DVBS;
fi->type = FE_QPSK;

fi->frequency_min = 950000;
fi->frequency_max = 2150000;
Expand All @@ -193,8 +192,7 @@ void fdtv_frontend_init(struct firedtv *fdtv, const char *name)

case FIREDTV_DVB_S2:
ops->delsys[0] = SYS_DVBS;
ops->delsys[1] = SYS_DVBS;
fi->type = FE_QPSK;
ops->delsys[1] = SYS_DVBS2;

fi->frequency_min = 950000;
fi->frequency_max = 2150000;
Expand All @@ -215,7 +213,6 @@ void fdtv_frontend_init(struct firedtv *fdtv, const char *name)

case FIREDTV_DVB_C:
ops->delsys[0] = SYS_DVBC_ANNEX_A;
fi->type = FE_QAM;

fi->frequency_min = 47000000;
fi->frequency_max = 866000000;
Expand All @@ -234,7 +231,6 @@ void fdtv_frontend_init(struct firedtv *fdtv, const char *name)

case FIREDTV_DVB_T:
ops->delsys[0] = SYS_DVBT;
fi->type = FE_OFDM;

fi->frequency_min = 49000000;
fi->frequency_max = 861000000;
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/media/as102/as102_fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ static struct dvb_frontend_ops as102_fe_ops = {
.delsys = { SYS_DVBT },
.info = {
.name = "Unknown AS102 device",
.type = FE_OFDM,
.frequency_min = 174000000,
.frequency_max = 862000000,
.frequency_stepsize = 166667,
Expand Down

0 comments on commit 6225f18

Please sign in to comment.