Commit ddb6a90d authored by Daniel Scheller's avatar Daniel Scheller Committed by Mauro Carvalho Chehab
Browse files

media: dvb-frontends/stv0910: further coding style cleanup



Fixes up all remainders reported by "checkpatch.pl --strict"

Signed-off-by: default avatarDaniel Scheller <d.scheller@gmx.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 448461af
Loading
Loading
Loading
Loading
+46 −47
Original line number Diff line number Diff line
@@ -79,8 +79,8 @@ struct stv_base {

	u8                   adr;
	struct i2c_adapter  *i2c;
	struct mutex         i2c_lock;
	struct mutex         reg_lock;
	struct mutex         i2c_lock; /* shared I2C access protect */
	struct mutex         reg_lock; /* shared register write protect */
	int                  count;

	u32                  extclk;
@@ -595,12 +595,12 @@ static s32 table_lookup(struct slookup *table,
	s32 reg_diff;

	/* Assumes Table[0].RegValue > Table[imax].RegValue */
	if (reg_value >= table[0].reg_value)
	if (reg_value >= table[0].reg_value) {
		value = table[0].value;
	else if (reg_value <= table[imax].reg_value)
	} else if (reg_value <= table[imax].reg_value) {
		value = table[imax].value;
	else {
		while (imax-imin > 1) {
	} else {
		while ((imax - imin) > 1) {
			i = (imax + imin) / 2;
			if ((table[imin].reg_value >= reg_value) &&
			    (reg_value >= table[i].reg_value))
@@ -1211,7 +1211,6 @@ static int probe(struct stv *state)
	return 0;
}


static int gate_ctrl(struct dvb_frontend *fe, int enable)
{
	struct stv *state = fe->demodulator_priv;
@@ -1295,8 +1294,9 @@ static int read_snr(struct dvb_frontend *fe)
	if (!get_signal_to_noise(state, &snrval)) {
		p->cnr.stat[0].scale = FE_SCALE_DECIBEL;
		p->cnr.stat[0].uvalue = 100 * snrval; /* fix scale */
	} else
	} else {
		p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
	}

	return 0;
}
@@ -1490,9 +1490,9 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status)
		p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;

	/* read ber */
	if (*status & FE_HAS_VITERBI)
	if (*status & FE_HAS_VITERBI) {
		read_ber(fe);
	else {
	} else {
		p->pre_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
		p->pre_bit_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
	}
@@ -1584,7 +1584,6 @@ static int tune(struct dvb_frontend *fe, bool re_tune,
	return 0;
}


static int get_algo(struct dvb_frontend *fe)
{
	return DVBFE_ALGO_HW;
@@ -1728,7 +1727,7 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
	struct stv *state;
	struct stv_base *base;

	state = kzalloc(sizeof(struct stv), GFP_KERNEL);
	state = kzalloc(sizeof(*state), GFP_KERNEL);
	if (!state)
		return NULL;

@@ -1749,7 +1748,7 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
		base->count++;
		state->base = base;
	} else {
		base = kzalloc(sizeof(struct stv_base), GFP_KERNEL);
		base = kzalloc(sizeof(*base), GFP_KERNEL);
		if (!base)
			goto fail;
		base->i2c = i2c;
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ struct stv0910_cfg {

#if IS_REACHABLE(CONFIG_DVB_STV0910)

extern struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
				    struct stv0910_cfg *cfg, int nr);

#else