/* This function apply tuner config to tuner specified by tun_setup structure. I addr is unset, then admin status and tun addr status is more precise then current status, it's applied. Otherwise status and type are applied only to tuner with exactly the same addr.  */
static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup)
/* This function apply tuner config to tuner specified by tun_setup structure. I addr is unset, then admin status and tun addr status is more precise then current status, it's applied. Otherwise status and type are applied only to tuner with exactly the same addr.  */
static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup)
{
	struct tuner *t = to_tuner(i2c_get_clientdata(c));
	if ( (t->type == UNSET && ((tun_setup->addr == ADDR_UNSET) &&
		(t->mode_mask & tun_setup->mode_mask))) ||
		(tun_setup->addr == c->addr)) {
			set_type(c, tun_setup->type, tun_setup->mode_mask,
				 tun_setup->config, tun_setup->tuner_callback);
	} else
		tuner_dbg("set addr discarded for type %i, mask %x. "
			  "Asked to change tuner at addr 0x%02x, with mask %x\n",
			  t->type, t->mode_mask,
			  tun_setup->addr, tun_setup->mode_mask);
}