aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/tuner.h
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-06-06 15:10:39 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-18 13:24:02 -0400
commit7a91a80a0d1a0a83a94e773ec6245b31b7c4ceed (patch)
treed524d57405944826d4a6c375af1a77bab22546a2 /include/media/tuner.h
parent018ec5440b4994f560cdde78be6fb10d7ab370d7 (diff)
V4L/DVB (5753): Tuner: create struct tuner_operations
Move tuner callback function pointers out of struct tuner, into struct tuner_operations. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media/tuner.h')
-rw-r--r--include/media/tuner.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/include/media/tuner.h b/include/media/tuner.h
index da821a027e76..88eaf8930203 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -183,6 +183,17 @@ struct tuner_setup {
183 int (*tuner_callback) (void *dev, int command,int arg); 183 int (*tuner_callback) (void *dev, int command,int arg);
184}; 184};
185 185
186struct tuner_operations {
187 void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
188 void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);
189 int (*has_signal)(struct i2c_client *c);
190 int (*is_stereo)(struct i2c_client *c);
191 int (*get_afc)(struct i2c_client *c);
192 void (*tuner_status)(struct i2c_client *c);
193 void (*standby)(struct i2c_client *c);
194 void (*release)(struct i2c_client *c);
195};
196
186struct tuner { 197struct tuner {
187 /* device */ 198 /* device */
188 struct i2c_client i2c; 199 struct i2c_client i2c;
@@ -207,15 +218,7 @@ struct tuner {
207 unsigned int config; 218 unsigned int config;
208 int (*tuner_callback) (void *dev, int command,int arg); 219 int (*tuner_callback) (void *dev, int command,int arg);
209 220
210 /* function ptrs */ 221 struct tuner_operations ops;
211 void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
212 void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);
213 int (*has_signal)(struct i2c_client *c);
214 int (*is_stereo)(struct i2c_client *c);
215 int (*get_afc)(struct i2c_client *c);
216 void (*tuner_status)(struct i2c_client *c);
217 void (*standby)(struct i2c_client *c);
218 void (*release)(struct i2c_client *c);
219}; 222};
220 223
221extern unsigned const int tuner_count; 224extern unsigned const int tuner_count;