1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

use dd_compat file and adjust fallthroughs

This commit is contained in:
rjkm 2022-02-12 15:07:59 +01:00
parent 4ce76407e2
commit 1b49bfb8f1
8 changed files with 37 additions and 30 deletions

View File

@ -6,8 +6,11 @@ MODDEFS := CONFIG_DVB_CORE=m CONFIG_DVB_DDBRIDGE=m CONFIG_DVB_DRXK=m CONFIG_DVB_
KBUILD_EXTMOD = $(PWD) KBUILD_EXTMOD = $(PWD)
DDDVB_INC = "-I$(KBUILD_EXTMOD)/include -I$(KBUILD_EXTMOD)/include/linux -I$(KBUILD_EXTMOD)/frontends" ifeq ($(KERNEL_DVB_CORE),y)
DDDVB_INC = "--include=$(KBUILD_EXTMOD)/include/dd_compat.h -I$(KBUILD_EXTMOD)/frontends -I$(KBUILD_EXTMOD) -DKERNEL_DVB_CORE=y"
else
DDDVB_INC = "--include=$(KBUILD_EXTMOD)/include/dd_compat.h -I$(KBUILD_EXTMOD)/frontends -I$(KBUILD_EXTMOD)/include -I$(KBUILD_EXTMOD)/include/linux"
endif
all: all:
$(MAKE) -C $(KDIR) KBUILD_EXTMOD=$(PWD) $(MODDEFS) modules NOSTDINC_FLAGS=$(DDDVB_INC) $(MAKE) -C $(KDIR) KBUILD_EXTMOD=$(PWD) $(MODDEFS) modules NOSTDINC_FLAGS=$(DDDVB_INC)

View File

@ -11,4 +11,5 @@ obj-$(CONFIG_DVB_OCTONET) += octonet.o
ccflags-y += -Idrivers/media/dvb-core/ ccflags-y += -Idrivers/media/dvb-core/
ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -Idrivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners/ ccflags-y += -Idrivers/media/tuners/
ccflags-y += --include=dd_compat.h

View File

@ -336,7 +336,7 @@ static int ddb_buffers_alloc(struct ddb *dev)
if (dma_alloc(dev->pdev, if (dma_alloc(dev->pdev,
port->input[0]->dma, 0) < 0) port->input[0]->dma, 0) < 0)
return -1; return -1;
/* fallthrough */ fallthrough;
case DDB_PORT_MOD: case DDB_PORT_MOD:
if (port->output->dma) if (port->output->dma)
if (dma_alloc(dev->pdev, if (dma_alloc(dev->pdev,
@ -1451,35 +1451,35 @@ static void dvb_input_detach(struct ddb_input *input)
case 0x41: case 0x41:
if (dvb->fe2) if (dvb->fe2)
dvb_unregister_frontend(dvb->fe2); dvb_unregister_frontend(dvb->fe2);
/* fallthrough */ fallthrough;
case 0x40: case 0x40:
if (dvb->fe) if (dvb->fe)
dvb_unregister_frontend(dvb->fe); dvb_unregister_frontend(dvb->fe);
/* fallthrough */ fallthrough;
case 0x30: case 0x30:
dvb_frontend_detach(dvb->fe); dvb_frontend_detach(dvb->fe);
dvb->fe = NULL; dvb->fe = NULL;
dvb->fe2 = NULL; dvb->fe2 = NULL;
/* fallthrough */ fallthrough;
case 0x21: case 0x21:
if (input->port->dev->ns_num) if (input->port->dev->ns_num)
dvb_netstream_release(&dvb->dvbns); dvb_netstream_release(&dvb->dvbns);
/* fallthrough */ fallthrough;
case 0x20: case 0x20:
dvb_net_release(&dvb->dvbnet); dvb_net_release(&dvb->dvbnet);
/* fallthrough */ fallthrough;
case 0x12: case 0x12:
dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, dvbdemux->dmx.remove_frontend(&dvbdemux->dmx,
&dvb->hw_frontend); &dvb->hw_frontend);
dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, dvbdemux->dmx.remove_frontend(&dvbdemux->dmx,
&dvb->mem_frontend); &dvb->mem_frontend);
/* fallthrough */ fallthrough;
case 0x11: case 0x11:
dvb_dmxdev_release(&dvb->dmxdev); dvb_dmxdev_release(&dvb->dmxdev);
/* fallthrough */ fallthrough;
case 0x10: case 0x10:
dvb_dmx_release(&dvb->demux); dvb_dmx_release(&dvb->demux);
/* fallthrough */ fallthrough;
case 0x01: case 0x01:
break; break;
} }
@ -1720,7 +1720,7 @@ static int dvb_input_attach(struct ddb_input *input)
osc24 = 0; osc24 = 0;
else else
osc24 = 1; osc24 = 1;
/* fallthrough */ fallthrough;
case DDB_TUNER_DVBCT2_SONY_P: case DDB_TUNER_DVBCT2_SONY_P:
case DDB_TUNER_DVBC2T2_SONY_P: case DDB_TUNER_DVBC2T2_SONY_P:
case DDB_TUNER_ISDBT_SONY_P: case DDB_TUNER_ISDBT_SONY_P:
@ -1737,7 +1737,7 @@ static int dvb_input_attach(struct ddb_input *input)
break; break;
case DDB_TUNER_DVBC2T2I_SONY: case DDB_TUNER_DVBC2T2I_SONY:
osc24 = 1; osc24 = 1;
/* fallthrough */ fallthrough;
case DDB_TUNER_DVBCT2_SONY: case DDB_TUNER_DVBCT2_SONY:
case DDB_TUNER_DVBC2T2_SONY: case DDB_TUNER_DVBC2T2_SONY:
case DDB_TUNER_ISDBT_SONY: case DDB_TUNER_ISDBT_SONY:
@ -2184,7 +2184,7 @@ static int ddb_port_attach(struct ddb_port *port)
ret = ddb_ci_attach(port, ci_bitrate); ret = ddb_ci_attach(port, ci_bitrate);
if (ret < 0) if (ret < 0)
break; break;
/* fallthrough */ fallthrough;
case DDB_PORT_LOOP: case DDB_PORT_LOOP:
ret = dvb_register_device(port->dvb[0].adap, ret = dvb_register_device(port->dvb[0].adap,
&port->dvb[0].dev, &port->dvb[0].dev,
@ -2640,7 +2640,8 @@ static void ddb_ports_init(struct ddb *dev)
ddb_input_init(port, 4 + i, 1, 4 + i); ddb_input_init(port, 4 + i, 1, 4 + i);
ddb_output_init(port, i); ddb_output_init(port, i);
break; break;
} /* fallthrough */ }
fallthrough;
case DDB_OCTONET: case DDB_OCTONET:
case DDB_OCTOPUS: case DDB_OCTOPUS:
case DDB_OCTOPRO: case DDB_OCTOPRO:
@ -4455,7 +4456,7 @@ int ddb_exit_ddbridge(int stage, int error)
default: default:
case 2: case 2:
destroy_workqueue(ddb_wq); destroy_workqueue(ddb_wq);
/* fallthrough */ fallthrough;
case 1: case 1:
ddb_class_destroy(); ddb_class_destroy();
} }

View File

@ -11,3 +11,4 @@ dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \
obj-$(CONFIG_DVB_CORE) += dvb-core.o obj-$(CONFIG_DVB_CORE) += dvb-core.o
ccflags-y += -Idrivers/media/dvb-core/ ccflags-y += -Idrivers/media/dvb-core/
ccflags-y += --include=dd_compat.h

View File

@ -553,7 +553,7 @@ static int dvb_net_ule_new_payload(struct dvb_net_ule_handle *h)
h->priv->ule_sndu_type_1 = 1; h->priv->ule_sndu_type_1 = 1;
h->ts_remain -= 1; h->ts_remain -= 1;
h->from_where += 1; h->from_where += 1;
/* fallthrough */ fallthrough;
case 0: case 0:
h->new_ts = 1; h->new_ts = 1;
h->ts += TS_SZ; h->ts += TS_SZ;

View File

@ -4,6 +4,7 @@
ccflags-y += -I$(srctree)/drivers/media/dvb-core/ ccflags-y += -I$(srctree)/drivers/media/dvb-core/
ccflags-y += -I$(srctree)/drivers/media/tuners/ ccflags-y += -I$(srctree)/drivers/media/tuners/
ccflags-y += --include=dd_compat.h
# FIXME: RTL2832 SDR driver uses power management directly from USB IF driver # FIXME: RTL2832 SDR driver uses power management directly from USB IF driver
ifdef CONFIG_DVB_RTL2832_SDR ifdef CONFIG_DVB_RTL2832_SDR

View File

@ -1566,7 +1566,7 @@ static int SetOperationMode(struct drxk_state *state, enum OperationMode oMode)
case OM_QAM_ITU_B: case OM_QAM_ITU_B:
status = -1; status = -1;
break; break;
case OM_QAM_ITU_A: /* fallthrough */ case OM_QAM_ITU_A:
case OM_QAM_ITU_C: case OM_QAM_ITU_C:
CHK_ERROR(MPEGTSStop(state)); CHK_ERROR(MPEGTSStop(state));
CHK_ERROR(PowerDownQAM(state)); CHK_ERROR(PowerDownQAM(state));
@ -1589,7 +1589,7 @@ static int SetOperationMode(struct drxk_state *state, enum OperationMode oMode)
case OM_QAM_ITU_B: case OM_QAM_ITU_B:
status = -1; status = -1;
break; break;
case OM_QAM_ITU_A: /* fallthrough */ case OM_QAM_ITU_A:
case OM_QAM_ITU_C: case OM_QAM_ITU_C:
state->m_OperationMode = oMode; state->m_OperationMode = oMode;
CHK_ERROR(SetQAMStandard(state,oMode)); CHK_ERROR(SetQAMStandard(state,oMode));
@ -1765,7 +1765,7 @@ static int MPEGTSDtoSetup(struct drxk_state *state, enum OperationMode oMode)
fecOcRcnCtlRate = 0xC00000; fecOcRcnCtlRate = 0xC00000;
staticCLK = state->m_DVBTStaticCLK; staticCLK = state->m_DVBTStaticCLK;
break; break;
case OM_QAM_ITU_A: /* fallthrough */ case OM_QAM_ITU_A:
case OM_QAM_ITU_C: case OM_QAM_ITU_C:
fecOcTmdMode = 0x0004; fecOcTmdMode = 0x0004;
fecOcRcnCtlRate = 0xD2B4EE; /* good for >63 Mb/s */ fecOcRcnCtlRate = 0xD2B4EE; /* good for >63 Mb/s */
@ -2804,12 +2804,12 @@ static int DVBTScCommand(struct drxk_state *state,
case OFDM_SC_RA_RAM_CMD_PROGRAM_PARAM: case OFDM_SC_RA_RAM_CMD_PROGRAM_PARAM:
status = Write16_0(state, OFDM_SC_RA_RAM_PARAM1__A, param1); status = Write16_0(state, OFDM_SC_RA_RAM_PARAM1__A, param1);
/* All commands using 1 parameters */ /* All commands using 1 parameters */
/* fall through */ fallthrough;
case OFDM_SC_RA_RAM_CMD_SET_ECHO_TIMING: case OFDM_SC_RA_RAM_CMD_SET_ECHO_TIMING:
case OFDM_SC_RA_RAM_CMD_USER_IO: case OFDM_SC_RA_RAM_CMD_USER_IO:
status = Write16_0(state, OFDM_SC_RA_RAM_PARAM0__A, param0); status = Write16_0(state, OFDM_SC_RA_RAM_PARAM0__A, param0);
/* All commands using 0 parameters */ /* All commands using 0 parameters */
/* fall through */ fallthrough;
case OFDM_SC_RA_RAM_CMD_GET_OP_PARAM: case OFDM_SC_RA_RAM_CMD_GET_OP_PARAM:
case OFDM_SC_RA_RAM_CMD_NULL: case OFDM_SC_RA_RAM_CMD_NULL:
/* Write command */ /* Write command */
@ -3218,7 +3218,7 @@ static int SetDVBT (struct drxk_state *state,u16 IntermediateFreqkHz, s32 tunerF
default: default:
operationMode |= OFDM_SC_RA_RAM_OP_AUTO_MODE__M; operationMode |= OFDM_SC_RA_RAM_OP_AUTO_MODE__M;
/* try first guess DRX_FFTMODE_8K */ /* try first guess DRX_FFTMODE_8K */
/* fall through */ fallthrough;
case TRANSMISSION_MODE_8K: case TRANSMISSION_MODE_8K:
transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_MODE_8K; transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_MODE_8K;
break; break;
@ -3237,7 +3237,7 @@ static int SetDVBT (struct drxk_state *state,u16 IntermediateFreqkHz, s32 tunerF
case GUARD_INTERVAL_AUTO: case GUARD_INTERVAL_AUTO:
operationMode |= OFDM_SC_RA_RAM_OP_AUTO_GUARD__M; operationMode |= OFDM_SC_RA_RAM_OP_AUTO_GUARD__M;
/* try first guess DRX_GUARD_1DIV4 */ /* try first guess DRX_GUARD_1DIV4 */
/* fall through */ fallthrough;
case GUARD_INTERVAL_1_4: case GUARD_INTERVAL_1_4:
transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_4; transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_4;
break; break;
@ -3265,7 +3265,7 @@ static int SetDVBT (struct drxk_state *state,u16 IntermediateFreqkHz, s32 tunerF
/* try first guess SC_RA_RAM_OP_PARAM_HIER_NO */ /* try first guess SC_RA_RAM_OP_PARAM_HIER_NO */
// transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_HIER_NO; // transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_HIER_NO;
//break; //break;
/* fall through */ fallthrough;
case HIERARCHY_1: case HIERARCHY_1:
transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_HIER_A1; transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_HIER_A1;
break; break;
@ -3288,7 +3288,7 @@ static int SetDVBT (struct drxk_state *state,u16 IntermediateFreqkHz, s32 tunerF
default: default:
operationMode |= OFDM_SC_RA_RAM_OP_AUTO_CONST__M; operationMode |= OFDM_SC_RA_RAM_OP_AUTO_CONST__M;
/* try first guess DRX_CONSTELLATION_QAM64 */ /* try first guess DRX_CONSTELLATION_QAM64 */
/* fall through */ fallthrough;
case QAM_64: case QAM_64:
transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_CONST_QAM64; transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_CONST_QAM64;
break; break;
@ -3311,7 +3311,7 @@ static int SetDVBT (struct drxk_state *state,u16 IntermediateFreqkHz, s32 tunerF
transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_PRIO_HI; transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_PRIO_HI;
WR16(devAddr, OFDM_EC_SB_PRIOR__A, OFDM_EC_SB_PRIOR_HI)); WR16(devAddr, OFDM_EC_SB_PRIOR__A, OFDM_EC_SB_PRIOR_HI));
break; break;
case DRX_PRIORITY_UNKNOWN : /* fall through */ case DRX_PRIORITY_UNKNOWN:
default: default:
return (DRX_STS_INVALID_ARG); return (DRX_STS_INVALID_ARG);
break; break;
@ -3332,7 +3332,7 @@ static int SetDVBT (struct drxk_state *state,u16 IntermediateFreqkHz, s32 tunerF
default: default:
operationMode |= OFDM_SC_RA_RAM_OP_AUTO_RATE__M; operationMode |= OFDM_SC_RA_RAM_OP_AUTO_RATE__M;
/* try first guess DRX_CODERATE_2DIV3 */ /* try first guess DRX_CODERATE_2DIV3 */
/* fall through */ fallthrough;
case FEC_2_3 : case FEC_2_3 :
transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_RATE_2_3; transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_RATE_2_3;
break; break;

View File

@ -786,7 +786,7 @@ static int get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties
default: default:
break; break;
} }
/* fallthrough */ fallthrough;
case SYS_DVBS: case SYS_DVBS:
switch ((MXL_HYDRA_MODULATION_E) switch ((MXL_HYDRA_MODULATION_E)
regData[DMD_MODULATION_SCHEME_ADDR]) { regData[DMD_MODULATION_SCHEME_ADDR]) {