diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-06 15:10:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:02 -0400 |
commit | 7a91a80a0d1a0a83a94e773ec6245b31b7c4ceed (patch) | |
tree | d524d57405944826d4a6c375af1a77bab22546a2 /include/media/tuner.h | |
parent | 018ec5440b4994f560cdde78be6fb10d7ab370d7 (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.h | 21 |
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 | ||
186 | struct 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 | |||
186 | struct tuner { | 197 | struct 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 | ||
221 | extern unsigned const int tuner_count; | 224 | extern unsigned const int tuner_count; |