/* Switch tuner to other mode. If tuner support both tv and radio, set another frequency to some value (This is needed for some pal tuners to avoid locking). Otherwise, just put second tuner in standby mode.  */
static int set_mode(struct i2c_client *client, struct tuner *t, int mode, char *cmd)
/* Switch tuner to other mode. If tuner support both tv and radio, set another frequency to some value (This is needed for some pal tuners to avoid locking). Otherwise, just put second tuner in standby mode.  */
static int set_mode(struct i2c_client *client, struct tuner *t, int mode, char *cmd)
{
	struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops;
	if (mode == t->mode)
		return 0;
	t->mode = mode;
	if (check_mode(t, cmd) == -EINVAL) {
		tuner_dbg("Tuner doesn't support this mode. "
			  "Putting tuner to sleep\n");
		t->mode = T_STANDBY;
		if (analog_ops->standby)
			analog_ops->standby(&t->fe);
		return -EINVAL;
	}
	return 0;
}