summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-06-06 15:10:39 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2007-06-06 15:10:39 -0400
commit6c2e0165de4e6b3991c7b414bff6719f7cc0b427 (patch)
tree5cc29f808b2e111ad99218ab1d955824e9553e3b /linux/include
parenta3e8a936b8fdb95bae387f41ca9c130387ab30d7 (diff)
downloadmediapointer-dvb-s2-6c2e0165de4e6b3991c7b414bff6719f7cc0b427.tar.gz
mediapointer-dvb-s2-6c2e0165de4e6b3991c7b414bff6719f7cc0b427.tar.bz2
tuner: create struct tuner_operations
From: Michael Krufky <mkrufky@linuxtv.org> Move tuner callback function pointers out of struct tuner, into struct tuner_operations. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/media/tuner.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h
index 1f61f4681..e1821aa21 100644
--- a/linux/include/media/tuner.h
+++ b/linux/include/media/tuner.h
@@ -183,6 +183,17 @@ struct tuner_setup {
int (*tuner_callback) (void *dev, int command,int arg);
};
+struct tuner_operations {
+ void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
+ void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);
+ int (*has_signal)(struct i2c_client *c);
+ int (*is_stereo)(struct i2c_client *c);
+ int (*get_afc)(struct i2c_client *c);
+ void (*tuner_status)(struct i2c_client *c);
+ void (*standby)(struct i2c_client *c);
+ void (*release)(struct i2c_client *c);
+};
+
struct tuner {
/* device */
struct i2c_client i2c;
@@ -207,15 +218,7 @@ struct tuner {
unsigned int config;
int (*tuner_callback) (void *dev, int command,int arg);
- /* function ptrs */
- void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
- void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);
- int (*has_signal)(struct i2c_client *c);
- int (*is_stereo)(struct i2c_client *c);
- int (*get_afc)(struct i2c_client *c);
- void (*tuner_status)(struct i2c_client *c);
- void (*standby)(struct i2c_client *c);
- void (*release)(struct i2c_client *c);
+ struct tuner_operations ops;
};
extern unsigned const int tuner_count;