From 017775baf90cbd3c43a14e4d10e00e1aca9f98f2 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 8 Dec 2007 15:06:30 -0500 Subject: tuner: combine set_tv_freq and set_radio_freq into a single set_params method From: Michael Krufky We can tell whether we are tuning television or radio by testing for struct analog_parameters *params->mode == V4L2_TUNER_RADIO There is no longer any need for separate set_tv_freq and set_radio_freq functions in the analog tuner demodulator modules. Signed-off-by: Michael Krufky --- linux/drivers/media/video/tuner-driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/video/tuner-driver.h') diff --git a/linux/drivers/media/video/tuner-driver.h b/linux/drivers/media/video/tuner-driver.h index a4db32d97..91913ee08 100644 --- a/linux/drivers/media/video/tuner-driver.h +++ b/linux/drivers/media/video/tuner-driver.h @@ -32,8 +32,8 @@ extern unsigned const int tuner_count; struct tuner; struct analog_tuner_ops { - void (*set_tv_freq)(struct dvb_frontend *fe, unsigned int freq); - void (*set_radio_freq)(struct dvb_frontend *fe, unsigned int freq); + void (*set_params)(struct dvb_frontend *fe, + struct analog_parameters *params); int (*has_signal)(struct dvb_frontend *fe); int (*is_stereo)(struct dvb_frontend *fe); int (*get_afc)(struct dvb_frontend *fe); -- cgit v1.2.3 From 1eb95e84c755878770c7a55f8fc226dd63170813 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 9 Dec 2007 00:26:48 -0500 Subject: tda8290: remove dependency on struct tuner From: Michael Krufky - remove dependency of tda8290 module on struct tuner - move tuner_foo printk macros from tuner-driver.h into tuner-core.c - clean up #includes of tuner-i2c.h / tuner-driver.h Signed-off-by: Michael Krufky --- linux/drivers/media/video/tuner-driver.h | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'linux/drivers/media/video/tuner-driver.h') diff --git a/linux/drivers/media/video/tuner-driver.h b/linux/drivers/media/video/tuner-driver.h index 91913ee08..a215161d0 100644 --- a/linux/drivers/media/video/tuner-driver.h +++ b/linux/drivers/media/video/tuner-driver.h @@ -24,13 +24,10 @@ #include #include -#include "tuner-i2c.h" #include "dvb_frontend.h" extern unsigned const int tuner_count; -struct tuner; - struct analog_tuner_ops { void (*set_params)(struct dvb_frontend *fe, struct analog_parameters *params); @@ -69,28 +66,4 @@ struct tuner { int (*tuner_callback) (void *dev, int command,int arg); }; -/* ------------------------------------------------------------------------ */ - -#define tuner_warn(fmt, arg...) do { \ - printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX, \ - i2c_adapter_id(t->i2c->adapter), t->i2c->addr, ##arg); \ - } while (0) - -#define tuner_info(fmt, arg...) do { \ - printk(KERN_INFO "%s %d-%04x: " fmt, PREFIX, \ - i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); \ - } while (0) - -#define tuner_err(fmt, arg...) do { \ - printk(KERN_ERR "%s %d-%04x: " fmt, PREFIX, \ - i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); \ - } while (0) - -#define tuner_dbg(fmt, arg...) do { \ - extern int tuner_debug; \ - if (tuner_debug) \ - printk(KERN_DEBUG "%s %d-%04x: " fmt, PREFIX, \ - i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); \ - } while (0) - #endif /* __TUNER_DRIVER_H__ */ -- cgit v1.2.3 From 446475ffbe175d4c8c7cd071681b0c2ea1385650 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 9 Dec 2007 11:52:51 -0500 Subject: tuner: add struct analog_demod_info to struct analog_tuner_ops From: Michael Krufky Store the analog demodulator name in fe.ops.analog_demod_ops.info.name Signed-off-by: Michael Krufky --- linux/drivers/media/video/tuner-driver.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'linux/drivers/media/video/tuner-driver.h') diff --git a/linux/drivers/media/video/tuner-driver.h b/linux/drivers/media/video/tuner-driver.h index a215161d0..c245f501a 100644 --- a/linux/drivers/media/video/tuner-driver.h +++ b/linux/drivers/media/video/tuner-driver.h @@ -28,7 +28,14 @@ extern unsigned const int tuner_count; +struct analog_demod_info { + char name[128]; +}; + struct analog_tuner_ops { + + struct analog_demod_info info; + void (*set_params)(struct dvb_frontend *fe, struct analog_parameters *params); int (*has_signal)(struct dvb_frontend *fe); -- cgit v1.2.3 From ca436a99a3cc379dbd8d76c612f54971220a7ff5 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 10 Dec 2007 14:08:25 -0500 Subject: tuner: use char *name instead of 128 byte fixed array for demod info From: Michael Krufky Don't waste 128 bytes of memory for a name that might not actually need it. Signed-off-by: Michael Krufky --- linux/drivers/media/video/tuner-driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/tuner-driver.h') diff --git a/linux/drivers/media/video/tuner-driver.h b/linux/drivers/media/video/tuner-driver.h index c245f501a..65ced4350 100644 --- a/linux/drivers/media/video/tuner-driver.h +++ b/linux/drivers/media/video/tuner-driver.h @@ -29,7 +29,7 @@ extern unsigned const int tuner_count; struct analog_demod_info { - char name[128]; + char *name; }; struct analog_tuner_ops { -- cgit v1.2.3