Skip to contentSkip to conversation

ngene: cleanup superfluous I2C adapter evaluation

PATCH New Daniel Scheller 1 participant 2 messages Apr 22, 2018 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ngene: cleanup superfluous I2C adapter evaluation

From: Daniel Scheller <[email protected]>

Commit ee93340e98bc ("media: ngene: deduplicate I2C adapter evaluation") added a helper to evaluate the I2C adapter to be used for demod/tuner attachment based on the given ngene_channel, and that helper is used in many attach functions to initialise the i2c_adapter variable. However, for some reason in tuner_attach_stv6110() and demod_attach_stv0900(), the adapter evaluation wasn't removed as in all other functions. Fix (or finalize, even) the helper use by cleaning up the superfluous I2C adapter evaluation leftover in these two functions.

---
 drivers/media/pci/ngene/ngene-cards.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/media/pci/ngene/ngene-cards.c +0 -13
index 65fc8f23ad86..caa5976055c4 100644
@@ -137,11 +137,6 @@ static int tuner_attach_stv6110(struct ngene_channel *chan)
 		chan->dev->card_info->tuner_config[chan->number];
 	const struct stv6110x_devctl *ctl;
 
-	if (chan->number < 2)
-		i2c = &chan->dev->channel[0].i2c_adapter;
-	else
-		i2c = &chan->dev->channel[1].i2c_adapter;
-
 	ctl = dvb_attach(stv6110x_attach, chan->fe, tunerconf, i2c);
 	if (ctl == NULL) {
 		dev_err(pdev, "No STV6110X found!\n");
@@ -304,14 +299,6 @@ static int demod_attach_stv0900(struct ngene_channel *chan)
 	struct stv090x_config *feconf = (struct stv090x_config *)
 		chan->dev->card_info->fe_config[chan->number];
 
-	/* tuner 1+2: i2c adapter #0, tuner 3+4: i2c adapter #1 */
-	/* Note: Both adapters share the same i2c bus, but the demod     */
-	/*       driver requires that each demod has its own i2c adapter */
-	if (chan->number < 2)
-		i2c = &chan->dev->channel[0].i2c_adapter;
-	else
-		i2c = &chan->dev->channel[1].i2c_adapter;
-
 	chan->fe = dvb_attach(stv090x_attach, feconf, i2c,
 			(chan->number & 1) == 0 ? STV090x_DEMODULATOR_0
 						: STV090x_DEMODULATOR_1);
Signature · 1 line
2.16.1
#1 lore raw

PATCH 2/2 ngene: fix ci_tsfix modparam description typo

From: Daniel Scheller <[email protected]>

s/shifs/shifts/

---
 drivers/media/pci/ngene/ngene-dvb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ngene/ngene-dvb.c +1 -1
index fee89b9ed9c1..5147e83397a1 100644
@@ -40,7 +40,7 @@
 
 static int ci_tsfix = 1;
 module_param(ci_tsfix, int, 0444);
-MODULE_PARM_DESC(ci_tsfix, "Detect and fix TS buffer offset shifs in conjunction with CI expansions (default: 1/enabled)");
+MODULE_PARM_DESC(ci_tsfix, "Detect and fix TS buffer offset shifts in conjunction with CI expansions (default: 1/enabled)");
 
 /****************************************************************************/
 /* COMMAND API interface ****************************************************/
Signature · 1 line
2.16.1