Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a91a80a authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (5753): Tuner: create struct tuner_operations



Move tuner callback function pointers out of struct tuner, into
struct tuner_operations.

Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 018ec544
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -361,8 +361,8 @@ static int mt2032_init(struct i2c_client *c)
	} while (xok != 1 );
	priv->xogc=xogc;

	t->set_tv_freq    = mt2032_set_tv_freq;
	t->set_radio_freq = mt2032_set_radio_freq;
	t->ops.set_tv_freq    = mt2032_set_tv_freq;
	t->ops.set_radio_freq = mt2032_set_radio_freq;
	return(1);
}

@@ -490,8 +490,8 @@ static int mt2050_init(struct i2c_client *c)
	i2c_master_recv(c,buf,1);

	tuner_dbg("mt2050: sro is %x\n",buf[0]);
	t->set_tv_freq    = mt2050_set_tv_freq;
	t->set_radio_freq = mt2050_set_radio_freq;
	t->ops.set_tv_freq    = mt2050_set_tv_freq;
	t->ops.set_radio_freq = mt2050_set_radio_freq;
	return 0;
}

@@ -519,10 +519,10 @@ int microtune_init(struct i2c_client *c)
	priv->radio_if2 = 10700 * 1000;	/* 10.7MHz - FM radio */

	memset(buf,0,sizeof(buf));
	t->set_tv_freq    = NULL;
	t->set_radio_freq = NULL;
	t->standby    = NULL;
	t->release        = microtune_release;
	t->ops.set_tv_freq    = NULL;
	t->ops.set_radio_freq = NULL;
	t->ops.standby    = NULL;
	t->ops.release        = microtune_release;
	if (t->std & V4L2_STD_525_60) {
		tuner_dbg("pinnacle ntsc\n");
		priv->radio_if2 = 41300 * 1000;
+5 −5
Original line number Diff line number Diff line
@@ -667,11 +667,11 @@ int tda8290_init(struct i2c_client *c)
	}
	tuner_info("type set to %s\n", c->name);

	t->set_tv_freq    = set_tv_freq;
	t->set_radio_freq = set_radio_freq;
	t->has_signal = has_signal;
	t->standby = standby;
	t->release = tda8290_release;
	t->ops.set_tv_freq    = set_tv_freq;
	t->ops.set_radio_freq = set_radio_freq;
	t->ops.has_signal = has_signal;
	t->ops.standby = standby;
	t->ops.release = tda8290_release;
	priv->tda827x_lpsel = 0;
	t->mode = V4L2_TUNER_ANALOG_TV;

+6 −6
Original line number Diff line number Diff line
@@ -614,12 +614,12 @@ int tda9887_tuner_init(struct i2c_client *c)
	tda9887_info("tda988[5/6/7] found @ 0x%x (%s)\n", t->i2c.addr,
						t->i2c.driver->driver.name);

	t->set_tv_freq = tda9887_set_freq;
	t->set_radio_freq = tda9887_set_freq;
	t->standby = tda9887_standby;
	t->tuner_status = tda9887_tuner_status;
	t->get_afc = tda9887_get_afc;
	t->release = tda9887_release;
	t->ops.set_tv_freq = tda9887_set_freq;
	t->ops.set_radio_freq = tda9887_set_freq;
	t->ops.standby = tda9887_standby;
	t->ops.tuner_status = tda9887_tuner_status;
	t->ops.get_afc = tda9887_get_afc;
	t->ops.release = tda9887_release;

	return 0;
}
+4 −4
Original line number Diff line number Diff line
@@ -229,10 +229,10 @@ int tea5761_tuner_init(struct i2c_client *c)
	tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5761HN FM Radio");
	strlcpy(c->name, "tea5761", sizeof(c->name));

	t->set_tv_freq = set_tv_freq;
	t->set_radio_freq = set_radio_freq;
	t->has_signal = tea5761_signal;
	t->is_stereo = tea5761_stereo;
	t->ops.set_tv_freq = set_tv_freq;
	t->ops.set_radio_freq = set_radio_freq;
	t->ops.has_signal = tea5761_signal;
	t->ops.is_stereo = tea5761_stereo;

	return (0);
}
+5 −5
Original line number Diff line number Diff line
@@ -350,11 +350,11 @@ int tea5767_tuner_init(struct i2c_client *c)
	tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio");
	strlcpy(c->name, "tea5767", sizeof(c->name));

	t->set_tv_freq = set_tv_freq;
	t->set_radio_freq = set_radio_freq;
	t->has_signal = tea5767_signal;
	t->is_stereo = tea5767_stereo;
	t->standby = tea5767_standby;
	t->ops.set_tv_freq = set_tv_freq;
	t->ops.set_radio_freq = set_radio_freq;
	t->ops.has_signal = tea5767_signal;
	t->ops.is_stereo = tea5767_stereo;
	t->ops.standby = tea5767_standby;

	return (0);
}
Loading