diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-17 12:02:47 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-17 16:39:14 -0400 |
commit | dcadd0826fce17e77cd6260569cbb3dd681c868c (patch) | |
tree | 2ba2c743a0a8eb0e1ba0ac5a07c4ff89771d8b21 /drivers/media/video/videobuf-dvb.c | |
parent | 64decbfe0dca9535a6f9b0c6fa654e3c2eb47877 (diff) |
V4L/DVB (9276): videobuf-dvb: two functions are now static
This patch marks those two functions as static:
static int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe,
static int videobuf_dvb_register_frontend(struct dvb_adapter *adapter,
Since MFE patches changed their calls by videobuf_dvb_register_bus.
To avoid having to declare the prototypes, the patch moves
videobuf_dvb_register_bus() to be after the declaration of the above functions
used there.
Cc: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf-dvb.c')
-rw-r--r-- | drivers/media/video/videobuf-dvb.c | 108 |
1 files changed, 50 insertions, 58 deletions
diff --git a/drivers/media/video/videobuf-dvb.c b/drivers/media/video/videobuf-dvb.c index adf7674b4a02..917277d36605 100644 --- a/drivers/media/video/videobuf-dvb.c +++ b/drivers/media/video/videobuf-dvb.c | |||
@@ -133,55 +133,7 @@ static int videobuf_dvb_stop_feed(struct dvb_demux_feed *feed) | |||
133 | return err; | 133 | return err; |
134 | } | 134 | } |
135 | 135 | ||
136 | /* ------------------------------------------------------------------ */ | 136 | static int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, |
137 | /* Register a single adapter and one or more frontends */ | ||
138 | int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f, | ||
139 | struct module *module, | ||
140 | void *adapter_priv, | ||
141 | struct device *device, | ||
142 | short *adapter_nr, | ||
143 | int mfe_shared) | ||
144 | { | ||
145 | struct list_head *list, *q; | ||
146 | struct videobuf_dvb_frontend *fe; | ||
147 | int res; | ||
148 | |||
149 | fe = videobuf_dvb_get_frontend(f, 1); | ||
150 | if (!fe) { | ||
151 | printk(KERN_WARNING "Unable to register the adapter which has no frontends\n"); | ||
152 | return -EINVAL; | ||
153 | } | ||
154 | |||
155 | /* Bring up the adapter */ | ||
156 | res = videobuf_dvb_register_adapter(f, module, adapter_priv, device, | ||
157 | fe->dvb.name, adapter_nr, mfe_shared); | ||
158 | if (res < 0) { | ||
159 | printk(KERN_WARNING "videobuf_dvb_register_adapter failed (errno = %d)\n", res); | ||
160 | return res; | ||
161 | } | ||
162 | |||
163 | /* Attach all of the frontends to the adapter */ | ||
164 | mutex_lock(&f->lock); | ||
165 | list_for_each_safe(list, q, &f->felist) { | ||
166 | fe = list_entry(list, struct videobuf_dvb_frontend, felist); | ||
167 | res = videobuf_dvb_register_frontend(&f->adapter, &fe->dvb); | ||
168 | if (res < 0) { | ||
169 | printk(KERN_WARNING "%s: videobuf_dvb_register_frontend failed (errno = %d)\n", | ||
170 | fe->dvb.name, res); | ||
171 | goto err; | ||
172 | } | ||
173 | } | ||
174 | mutex_unlock(&f->lock); | ||
175 | return 0; | ||
176 | |||
177 | err: | ||
178 | mutex_unlock(&f->lock); | ||
179 | videobuf_dvb_unregister_bus(f); | ||
180 | return res; | ||
181 | } | ||
182 | EXPORT_SYMBOL(videobuf_dvb_register_bus); | ||
183 | |||
184 | int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, | ||
185 | struct module *module, | 137 | struct module *module, |
186 | void *adapter_priv, | 138 | void *adapter_priv, |
187 | struct device *device, | 139 | struct device *device, |
@@ -206,7 +158,7 @@ int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, | |||
206 | return result; | 158 | return result; |
207 | } | 159 | } |
208 | 160 | ||
209 | int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, | 161 | static int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, |
210 | struct videobuf_dvb *dvb) | 162 | struct videobuf_dvb *dvb) |
211 | { | 163 | { |
212 | int result; | 164 | int result; |
@@ -294,6 +246,54 @@ fail_frontend: | |||
294 | return result; | 246 | return result; |
295 | } | 247 | } |
296 | 248 | ||
249 | /* ------------------------------------------------------------------ */ | ||
250 | /* Register a single adapter and one or more frontends */ | ||
251 | int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f, | ||
252 | struct module *module, | ||
253 | void *adapter_priv, | ||
254 | struct device *device, | ||
255 | short *adapter_nr, | ||
256 | int mfe_shared) | ||
257 | { | ||
258 | struct list_head *list, *q; | ||
259 | struct videobuf_dvb_frontend *fe; | ||
260 | int res; | ||
261 | |||
262 | fe = videobuf_dvb_get_frontend(f, 1); | ||
263 | if (!fe) { | ||
264 | printk(KERN_WARNING "Unable to register the adapter which has no frontends\n"); | ||
265 | return -EINVAL; | ||
266 | } | ||
267 | |||
268 | /* Bring up the adapter */ | ||
269 | res = videobuf_dvb_register_adapter(f, module, adapter_priv, device, | ||
270 | fe->dvb.name, adapter_nr, mfe_shared); | ||
271 | if (res < 0) { | ||
272 | printk(KERN_WARNING "videobuf_dvb_register_adapter failed (errno = %d)\n", res); | ||
273 | return res; | ||
274 | } | ||
275 | |||
276 | /* Attach all of the frontends to the adapter */ | ||
277 | mutex_lock(&f->lock); | ||
278 | list_for_each_safe(list, q, &f->felist) { | ||
279 | fe = list_entry(list, struct videobuf_dvb_frontend, felist); | ||
280 | res = videobuf_dvb_register_frontend(&f->adapter, &fe->dvb); | ||
281 | if (res < 0) { | ||
282 | printk(KERN_WARNING "%s: videobuf_dvb_register_frontend failed (errno = %d)\n", | ||
283 | fe->dvb.name, res); | ||
284 | goto err; | ||
285 | } | ||
286 | } | ||
287 | mutex_unlock(&f->lock); | ||
288 | return 0; | ||
289 | |||
290 | err: | ||
291 | mutex_unlock(&f->lock); | ||
292 | videobuf_dvb_unregister_bus(f); | ||
293 | return res; | ||
294 | } | ||
295 | EXPORT_SYMBOL(videobuf_dvb_register_bus); | ||
296 | |||
297 | void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f) | 297 | void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f) |
298 | { | 298 | { |
299 | struct list_head *list, *q; | 299 | struct list_head *list, *q; |
@@ -389,11 +389,3 @@ fail_alloc: | |||
389 | return fe; | 389 | return fe; |
390 | } | 390 | } |
391 | EXPORT_SYMBOL(videobuf_dvb_alloc_frontend); | 391 | EXPORT_SYMBOL(videobuf_dvb_alloc_frontend); |
392 | |||
393 | /* ------------------------------------------------------------------ */ | ||
394 | /* | ||
395 | * Local variables: | ||
396 | * c-basic-offset: 8 | ||
397 | * compile-command: "make DVB=1" | ||
398 | * End: | ||
399 | */ | ||