V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 39c7b9b..4a7735c 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -92,7 +92,6 @@
 
 	unsigned int        type; /* chip type id */
 	unsigned int        config;
-	int (*tuner_callback) (void *dev, int command, int arg);
 	const char          *name;
 };
 
@@ -346,7 +345,7 @@
 
 static void set_type(struct i2c_client *c, unsigned int type,
 		     unsigned int new_mode_mask, unsigned int new_config,
-		     int (*tuner_callback) (void *dev, int command,int arg))
+		     int (*tuner_callback) (void *dev, int component, int cmd, int arg))
 {
 	struct tuner *t = i2c_get_clientdata(c);
 	struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops;
@@ -362,7 +361,7 @@
 	t->config = new_config;
 	if (tuner_callback != NULL) {
 		tuner_dbg("defining GPIO callback\n");
-		t->tuner_callback = tuner_callback;
+		t->fe.callback = tuner_callback;
 	}
 
 	if (t->mode == T_UNINITIALIZED) {
@@ -385,7 +384,6 @@
 	{
 		struct tda829x_config cfg = {
 			.lna_cfg        = t->config,
-			.tuner_callback = t->tuner_callback,
 		};
 		if (!dvb_attach(tda829x_attach, &t->fe, t->i2c->adapter,
 				t->i2c->addr, &cfg))
@@ -433,7 +431,6 @@
 		struct xc2028_config cfg = {
 			.i2c_adap  = t->i2c->adapter,
 			.i2c_addr  = t->i2c->addr,
-			.callback  = t->tuner_callback,
 		};
 		if (!dvb_attach(xc2028_attach, &t->fe, &cfg))
 			goto attach_failed;
@@ -450,7 +447,6 @@
 
 		xc5000_cfg.i2c_address	  = t->i2c->addr;
 		xc5000_cfg.if_khz	  = 5380;
-		xc5000_cfg.tuner_callback = t->tuner_callback;
 		if (!dvb_attach(xc5000_attach,
 				&t->fe, t->i2c->adapter, &xc5000_cfg))
 			goto attach_failed;
@@ -1224,7 +1220,7 @@
 	} else {
 		t->mode = V4L2_TUNER_DIGITAL_TV;
 	}
-	set_type(client, t->type, t->mode_mask, t->config, t->tuner_callback);
+	set_type(client, t->type, t->mode_mask, t->config, t->fe.callback);
 	list_add_tail(&t->list, &tuner_list);
 	return 0;
 }