aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r--drivers/media/video/tuner-core.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 522ec1c35b8..b8c38a02884 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -145,7 +145,7 @@ static void set_freq(struct i2c_client *c, unsigned long freq)
145 145
146static void set_type(struct i2c_client *c, unsigned int type, 146static void set_type(struct i2c_client *c, unsigned int type,
147 unsigned int new_mode_mask, unsigned int new_config, 147 unsigned int new_mode_mask, unsigned int new_config,
148 tuner_gpio_func_t gpio_func) 148 int (*tuner_callback) (void *dev, int command,int arg))
149{ 149{
150 struct tuner *t = i2c_get_clientdata(c); 150 struct tuner *t = i2c_get_clientdata(c);
151 unsigned char buffer[4]; 151 unsigned char buffer[4];
@@ -169,16 +169,16 @@ static void set_type(struct i2c_client *c, unsigned int type,
169 } 169 }
170 170
171 t->type = type; 171 t->type = type;
172 t->config = new_config;
173 if (tuner_callback != NULL) {
174 tuner_dbg("defining GPIO callback\n");
175 t->tuner_callback = tuner_callback;
176 }
172 switch (t->type) { 177 switch (t->type) {
173 case TUNER_MT2032: 178 case TUNER_MT2032:
174 microtune_init(c); 179 microtune_init(c);
175 break; 180 break;
176 case TUNER_PHILIPS_TDA8290: 181 case TUNER_PHILIPS_TDA8290:
177 t->config = new_config;
178 if (gpio_func != NULL) {
179 tuner_dbg("Defining GPIO function\n");
180 t->gpio_func = gpio_func;
181 }
182 tda8290_init(c); 182 tda8290_init(c);
183 break; 183 break;
184 case TUNER_TEA5767: 184 case TUNER_TEA5767:
@@ -244,7 +244,7 @@ static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup)
244 (t->mode_mask & tun_setup->mode_mask))) || 244 (t->mode_mask & tun_setup->mode_mask))) ||
245 (tun_setup->addr == c->addr)) { 245 (tun_setup->addr == c->addr)) {
246 set_type(c, tun_setup->type, tun_setup->mode_mask, 246 set_type(c, tun_setup->type, tun_setup->mode_mask,
247 tun_setup->config, tun_setup->gpio_func); 247 tun_setup->config, tun_setup->tuner_callback);
248 } 248 }
249} 249}
250 250
@@ -503,7 +503,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
503register_client: 503register_client:
504 tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name); 504 tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name);
505 i2c_attach_client (&t->i2c); 505 i2c_attach_client (&t->i2c);
506 set_type (&t->i2c,t->type, t->mode_mask, t->config, t->gpio_func); 506 set_type (&t->i2c,t->type, t->mode_mask, t->config, t->tuner_callback);
507 return 0; 507 return 0;
508} 508}
509 509