blob: 4b32b214116959a699121ab8a3c930346f313648 [file] [log] [blame]
Michael Krufky04910bd2008-02-03 23:46:16 -03001/*
2 * pvrusb2-dvb.c - linux-dvb api interface to the pvrusb2 driver.
3 *
4 * Copyright (C) 2007, 2008 Michael Krufky <mkrufky@linuxtv.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
Michael Krufky04910bd2008-02-03 23:46:16 -030015 */
16
Michael Krufkyd8abe972008-02-03 23:55:07 -030017#include <linux/kthread.h>
Mike Iselybb8ce9d2008-02-04 00:00:19 -030018#include <linux/freezer.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090019#include <linux/slab.h>
Andrea Righi27ac7922008-07-23 21:28:13 -070020#include <linux/mm.h>
Mauro Carvalho Chehabfada1932017-12-28 13:03:51 -050021#include <media/dvbdev.h>
Michael Krufky485fcae2008-04-26 19:44:59 -030022#include "pvrusb2-debug.h"
Michael Krufky04910bd2008-02-03 23:46:16 -030023#include "pvrusb2-hdw-internal.h"
24#include "pvrusb2-hdw.h"
Mike Iselybb8ce9d2008-02-04 00:00:19 -030025#include "pvrusb2-io.h"
Michael Krufky04910bd2008-02-03 23:46:16 -030026#include "pvrusb2-dvb.h"
27
28DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
29
Mike Iselyceb43402008-02-06 04:24:51 -030030static int pvr2_dvb_feed_func(struct pvr2_dvb_adapter *adap)
Mike Iselybb8ce9d2008-02-04 00:00:19 -030031{
Mike Iselybb8ce9d2008-02-04 00:00:19 -030032 int ret;
33 unsigned int count;
34 struct pvr2_buffer *bp;
Mike Iselya36416d2008-02-06 06:59:48 -030035 struct pvr2_stream *stream;
Mike Iselybb8ce9d2008-02-04 00:00:19 -030036
Michael Krufky485fcae2008-04-26 19:44:59 -030037 pvr2_trace(PVR2_TRACE_DVB_FEED, "dvb feed thread started");
Mike Iselybb8ce9d2008-02-04 00:00:19 -030038 set_freezable();
39
Mike Iselya36416d2008-02-06 06:59:48 -030040 stream = adap->channel.stream->stream;
Mike Iselybb8ce9d2008-02-04 00:00:19 -030041
42 for (;;) {
Mike Iselya36416d2008-02-06 06:59:48 -030043 if (kthread_should_stop()) break;
Mike Iselybb8ce9d2008-02-04 00:00:19 -030044
45 /* Not sure about this... */
46 try_to_freeze();
47
Mike Iselya36416d2008-02-06 06:59:48 -030048 bp = pvr2_stream_get_ready_buffer(stream);
Mike Iselybb8ce9d2008-02-04 00:00:19 -030049 if (bp != NULL) {
50 count = pvr2_buffer_get_count(bp);
51 if (count) {
52 dvb_dmx_swfilter(
53 &adap->demux,
Mike Iselya36416d2008-02-06 06:59:48 -030054 adap->buffer_storage[
55 pvr2_buffer_get_id(bp)],
Mike Iselybb8ce9d2008-02-04 00:00:19 -030056 count);
57 } else {
58 ret = pvr2_buffer_get_status(bp);
Mike Iselya36416d2008-02-06 06:59:48 -030059 if (ret < 0) break;
Mike Iselybb8ce9d2008-02-04 00:00:19 -030060 }
61 ret = pvr2_buffer_queue(bp);
Mike Iselya36416d2008-02-06 06:59:48 -030062 if (ret < 0) break;
Mike Iselybb8ce9d2008-02-04 00:00:19 -030063
64 /* Since we know we did something to a buffer,
65 just go back and try again. No point in
66 blocking unless we really ran out of
67 buffers to process. */
68 continue;
69 }
70
71
Mike Isely07b80262008-03-30 20:36:31 -030072 /* Wait until more buffers become available or we're
73 told not to wait any longer. */
Mike Iselybb8ce9d2008-02-04 00:00:19 -030074 ret = wait_event_interruptible(
Mike Iselya36416d2008-02-06 06:59:48 -030075 adap->buffer_wait_data,
Mike Isely07b80262008-03-30 20:36:31 -030076 (pvr2_stream_get_ready_count(stream) > 0) ||
Mike Isely13e027a2008-04-07 02:57:13 -030077 kthread_should_stop());
Mike Iselya36416d2008-02-06 06:59:48 -030078 if (ret < 0) break;
Mike Iselybb8ce9d2008-02-04 00:00:19 -030079 }
80
Mike Iselybb8ce9d2008-02-04 00:00:19 -030081 /* If we get here and ret is < 0, then an error has occurred.
82 Probably would be a good idea to communicate that to DVB core... */
83
Michael Krufky485fcae2008-04-26 19:44:59 -030084 pvr2_trace(PVR2_TRACE_DVB_FEED, "dvb feed thread stopped");
Mike Iselybb8ce9d2008-02-04 00:00:19 -030085
Mike Iselyceb43402008-02-06 04:24:51 -030086 return 0;
87}
88
89static int pvr2_dvb_feed_thread(void *data)
90{
91 int stat = pvr2_dvb_feed_func(data);
Mike Iselybb8ce9d2008-02-04 00:00:19 -030092 /* from videobuf-dvb.c: */
93 while (!kthread_should_stop()) {
94 set_current_state(TASK_INTERRUPTIBLE);
95 schedule();
96 }
Mike Iselyceb43402008-02-06 04:24:51 -030097 return stat;
Mike Iselybb8ce9d2008-02-04 00:00:19 -030098}
99
Mike Iselya36416d2008-02-06 06:59:48 -0300100static void pvr2_dvb_notify(struct pvr2_dvb_adapter *adap)
Michael Krufkyd8abe972008-02-03 23:55:07 -0300101{
Mike Iselya36416d2008-02-06 06:59:48 -0300102 wake_up(&adap->buffer_wait_data);
103}
Michael Krufkyd8abe972008-02-03 23:55:07 -0300104
Mike Iselya36416d2008-02-06 06:59:48 -0300105static void pvr2_dvb_stream_end(struct pvr2_dvb_adapter *adap)
106{
107 unsigned int idx;
108 struct pvr2_stream *stream;
Michael Krufkyd8abe972008-02-03 23:55:07 -0300109
Mike Iselya36416d2008-02-06 06:59:48 -0300110 if (adap->thread) {
111 kthread_stop(adap->thread);
Michael Krufkyd8abe972008-02-03 23:55:07 -0300112 adap->thread = NULL;
113 }
114
Mike Iselya36416d2008-02-06 06:59:48 -0300115 if (adap->channel.stream) {
116 stream = adap->channel.stream->stream;
117 } else {
118 stream = NULL;
Michael Krufkyd8abe972008-02-03 23:55:07 -0300119 }
Mike Iselya36416d2008-02-06 06:59:48 -0300120 if (stream) {
121 pvr2_hdw_set_streaming(adap->channel.hdw, 0);
122 pvr2_stream_set_callback(stream, NULL, NULL);
123 pvr2_stream_kill(stream);
124 pvr2_stream_set_buffer_count(stream, 0);
125 pvr2_channel_claim_stream(&adap->channel, NULL);
126 }
127
128 if (adap->stream_run) {
129 for (idx = 0; idx < PVR2_DVB_BUFFER_COUNT; idx++) {
130 if (!(adap->buffer_storage[idx])) continue;
131 kfree(adap->buffer_storage[idx]);
Harvey Harrisona6a3a172008-04-28 16:50:03 -0700132 adap->buffer_storage[idx] = NULL;
Mike Iselya36416d2008-02-06 06:59:48 -0300133 }
134 adap->stream_run = 0;
135 }
136}
137
138static int pvr2_dvb_stream_do_start(struct pvr2_dvb_adapter *adap)
139{
140 struct pvr2_context *pvr = adap->channel.mc_head;
141 unsigned int idx;
142 int ret;
143 struct pvr2_buffer *bp;
Harvey Harrisona6a3a172008-04-28 16:50:03 -0700144 struct pvr2_stream *stream = NULL;
Mike Iselya36416d2008-02-06 06:59:48 -0300145
146 if (adap->stream_run) return -EIO;
147
148 ret = pvr2_channel_claim_stream(&adap->channel, &pvr->video_stream);
149 /* somebody else already has the stream */
150 if (ret < 0) return ret;
151
152 stream = adap->channel.stream->stream;
153
154 for (idx = 0; idx < PVR2_DVB_BUFFER_COUNT; idx++) {
155 adap->buffer_storage[idx] = kmalloc(PVR2_DVB_BUFFER_SIZE,
156 GFP_KERNEL);
157 if (!(adap->buffer_storage[idx])) return -ENOMEM;
158 }
159
160 pvr2_stream_set_callback(pvr->video_stream.stream,
161 (pvr2_stream_callback) pvr2_dvb_notify, adap);
162
163 ret = pvr2_stream_set_buffer_count(stream, PVR2_DVB_BUFFER_COUNT);
164 if (ret < 0) return ret;
165
166 for (idx = 0; idx < PVR2_DVB_BUFFER_COUNT; idx++) {
167 bp = pvr2_stream_get_buffer(stream, idx);
168 pvr2_buffer_set_buffer(bp,
169 adap->buffer_storage[idx],
170 PVR2_DVB_BUFFER_SIZE);
171 }
172
173 ret = pvr2_hdw_set_streaming(adap->channel.hdw, 1);
174 if (ret < 0) return ret;
175
Harvey Harrisona6a3a172008-04-28 16:50:03 -0700176 while ((bp = pvr2_stream_get_idle_buffer(stream)) != NULL) {
Mike Iselya36416d2008-02-06 06:59:48 -0300177 ret = pvr2_buffer_queue(bp);
178 if (ret < 0) return ret;
179 }
180
181 adap->thread = kthread_run(pvr2_dvb_feed_thread, adap, "pvrusb2-dvb");
182
183 if (IS_ERR(adap->thread)) {
184 ret = PTR_ERR(adap->thread);
185 adap->thread = NULL;
186 return ret;
187 }
188
189 adap->stream_run = !0;
190
191 return 0;
192}
193
194static int pvr2_dvb_stream_start(struct pvr2_dvb_adapter *adap)
195{
196 int ret = pvr2_dvb_stream_do_start(adap);
197 if (ret < 0) pvr2_dvb_stream_end(adap);
198 return ret;
199}
200
201static int pvr2_dvb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
202{
203 struct pvr2_dvb_adapter *adap = dvbdmxfeed->demux->priv;
204 int ret = 0;
205
206 if (adap == NULL) return -ENODEV;
207
208 mutex_lock(&adap->lock);
209 do {
210 if (onoff) {
211 if (!adap->feedcount) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300212 pvr2_trace(PVR2_TRACE_DVB_FEED,
213 "start feeding demux");
Mike Iselya36416d2008-02-06 06:59:48 -0300214 ret = pvr2_dvb_stream_start(adap);
215 if (ret < 0) break;
216 }
217 (adap->feedcount)++;
218 } else if (adap->feedcount > 0) {
219 (adap->feedcount)--;
220 if (!adap->feedcount) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300221 pvr2_trace(PVR2_TRACE_DVB_FEED,
222 "stop feeding demux");
Mike Iselya36416d2008-02-06 06:59:48 -0300223 pvr2_dvb_stream_end(adap);
224 }
225 }
226 } while (0);
Michael Krufkyd8abe972008-02-03 23:55:07 -0300227 mutex_unlock(&adap->lock);
228
229 return ret;
230}
231
Michael Krufky04910bd2008-02-03 23:46:16 -0300232static int pvr2_dvb_start_feed(struct dvb_demux_feed *dvbdmxfeed)
233{
Michael Krufky485fcae2008-04-26 19:44:59 -0300234 pvr2_trace(PVR2_TRACE_DVB_FEED, "start pid: 0x%04x", dvbdmxfeed->pid);
Michael Krufkyd8abe972008-02-03 23:55:07 -0300235 return pvr2_dvb_ctrl_feed(dvbdmxfeed, 1);
Michael Krufky04910bd2008-02-03 23:46:16 -0300236}
237
238static int pvr2_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
239{
Michael Krufky485fcae2008-04-26 19:44:59 -0300240 pvr2_trace(PVR2_TRACE_DVB_FEED, "stop pid: 0x%04x", dvbdmxfeed->pid);
Michael Krufkyd8abe972008-02-03 23:55:07 -0300241 return pvr2_dvb_ctrl_feed(dvbdmxfeed, 0);
Michael Krufky04910bd2008-02-03 23:46:16 -0300242}
243
Michael Krufky99443ae2008-02-03 23:48:09 -0300244static int pvr2_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
245{
Mike Isely1cb03b72008-04-21 03:47:43 -0300246 struct pvr2_dvb_adapter *adap = fe->dvb->priv;
247 return pvr2_channel_limit_inputs(
248 &adap->channel,
249 (acquire ? (1 << PVR2_CVAL_INPUT_DTV) : 0));
Michael Krufky99443ae2008-02-03 23:48:09 -0300250}
251
Michael Krufky04910bd2008-02-03 23:46:16 -0300252static int pvr2_dvb_adapter_init(struct pvr2_dvb_adapter *adap)
253{
254 int ret;
255
256 ret = dvb_register_adapter(&adap->dvb_adap, "pvrusb2-dvb",
257 THIS_MODULE/*&hdw->usb_dev->owner*/,
Mike Iselya36416d2008-02-06 06:59:48 -0300258 &adap->channel.hdw->usb_dev->dev,
Michael Krufky04910bd2008-02-03 23:46:16 -0300259 adapter_nr);
260 if (ret < 0) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300261 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
262 "dvb_register_adapter failed: error %d", ret);
Michael Krufky04910bd2008-02-03 23:46:16 -0300263 goto err;
264 }
265 adap->dvb_adap.priv = adap;
266
267 adap->demux.dmx.capabilities = DMX_TS_FILTERING |
268 DMX_SECTION_FILTERING |
269 DMX_MEMORY_BASED_FILTERING;
270 adap->demux.priv = adap;
271 adap->demux.filternum = 256;
272 adap->demux.feednum = 256;
273 adap->demux.start_feed = pvr2_dvb_start_feed;
274 adap->demux.stop_feed = pvr2_dvb_stop_feed;
275 adap->demux.write_to_decoder = NULL;
276
277 ret = dvb_dmx_init(&adap->demux);
278 if (ret < 0) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300279 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
280 "dvb_dmx_init failed: error %d", ret);
Michael Krufky04910bd2008-02-03 23:46:16 -0300281 goto err_dmx;
282 }
283
284 adap->dmxdev.filternum = adap->demux.filternum;
285 adap->dmxdev.demux = &adap->demux.dmx;
286 adap->dmxdev.capabilities = 0;
287
288 ret = dvb_dmxdev_init(&adap->dmxdev, &adap->dvb_adap);
289 if (ret < 0) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300290 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
291 "dvb_dmxdev_init failed: error %d", ret);
Michael Krufky04910bd2008-02-03 23:46:16 -0300292 goto err_dmx_dev;
293 }
294
295 dvb_net_init(&adap->dvb_adap, &adap->dvb_net, &adap->demux.dmx);
296
Michael Krufky04910bd2008-02-03 23:46:16 -0300297 return 0;
298
299err_dmx_dev:
300 dvb_dmx_release(&adap->demux);
301err_dmx:
302 dvb_unregister_adapter(&adap->dvb_adap);
303err:
304 return ret;
305}
306
307static int pvr2_dvb_adapter_exit(struct pvr2_dvb_adapter *adap)
308{
Michael Krufky485fcae2008-04-26 19:44:59 -0300309 pvr2_trace(PVR2_TRACE_INFO, "unregistering DVB devices");
Mike Isely7dcc48f2008-02-09 15:55:54 -0300310 dvb_net_release(&adap->dvb_net);
311 adap->demux.dmx.close(&adap->demux.dmx);
312 dvb_dmxdev_release(&adap->dmxdev);
313 dvb_dmx_release(&adap->demux);
314 dvb_unregister_adapter(&adap->dvb_adap);
Michael Krufky04910bd2008-02-03 23:46:16 -0300315 return 0;
316}
317
318static int pvr2_dvb_frontend_init(struct pvr2_dvb_adapter *adap)
319{
Mike Iselya36416d2008-02-06 06:59:48 -0300320 struct pvr2_hdw *hdw = adap->channel.hdw;
Mike Isely69ea3c12009-03-07 02:08:58 -0300321 const struct pvr2_dvb_props *dvb_props = hdw->hdw_desc->dvb_props;
Mike Isely1cb03b72008-04-21 03:47:43 -0300322 int ret = 0;
Michael Krufky04910bd2008-02-03 23:46:16 -0300323
324 if (dvb_props == NULL) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300325 pvr2_trace(PVR2_TRACE_ERROR_LEGS, "fe_props not defined!");
Michael Krufky04910bd2008-02-03 23:46:16 -0300326 return -EINVAL;
327 }
328
Mike Isely1cb03b72008-04-21 03:47:43 -0300329 ret = pvr2_channel_limit_inputs(
330 &adap->channel,
331 (1 << PVR2_CVAL_INPUT_DTV));
332 if (ret) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300333 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
334 "failed to grab control of dtv input (code=%d)",
Mike Isely1cb03b72008-04-21 03:47:43 -0300335 ret);
Michael Krufkybde316a2008-02-10 05:33:37 -0300336 return ret;
Mike Isely1cb03b72008-04-21 03:47:43 -0300337 }
Michael Krufkybde316a2008-02-10 05:33:37 -0300338
Michael Krufky04910bd2008-02-03 23:46:16 -0300339 if (dvb_props->frontend_attach == NULL) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300340 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
341 "frontend_attach not defined!");
Mike Isely1cb03b72008-04-21 03:47:43 -0300342 ret = -EINVAL;
343 goto done;
Michael Krufky04910bd2008-02-03 23:46:16 -0300344 }
345
346 if ((dvb_props->frontend_attach(adap) == 0) && (adap->fe)) {
347
348 if (dvb_register_frontend(&adap->dvb_adap, adap->fe)) {
Michael Krufky485fcae2008-04-26 19:44:59 -0300349 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
350 "frontend registration failed!");
Michael Krufky04910bd2008-02-03 23:46:16 -0300351 dvb_frontend_detach(adap->fe);
352 adap->fe = NULL;
Mike Isely1cb03b72008-04-21 03:47:43 -0300353 ret = -ENODEV;
354 goto done;
Michael Krufky04910bd2008-02-03 23:46:16 -0300355 }
356
357 if (dvb_props->tuner_attach)
358 dvb_props->tuner_attach(adap);
359
360 if (adap->fe->ops.analog_ops.standby)
361 adap->fe->ops.analog_ops.standby(adap->fe);
362
Michael Krufky99443ae2008-02-03 23:48:09 -0300363 /* Ensure all frontends negotiate bus access */
364 adap->fe->ops.ts_bus_ctrl = pvr2_dvb_bus_ctrl;
365
Michael Krufky04910bd2008-02-03 23:46:16 -0300366 } else {
Michael Krufky485fcae2008-04-26 19:44:59 -0300367 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
368 "no frontend was attached!");
Mike Isely1cb03b72008-04-21 03:47:43 -0300369 ret = -ENODEV;
370 return ret;
Michael Krufky04910bd2008-02-03 23:46:16 -0300371 }
372
Mike Isely1cb03b72008-04-21 03:47:43 -0300373 done:
374 pvr2_channel_limit_inputs(&adap->channel, 0);
375 return ret;
Michael Krufky04910bd2008-02-03 23:46:16 -0300376}
377
378static int pvr2_dvb_frontend_exit(struct pvr2_dvb_adapter *adap)
379{
380 if (adap->fe != NULL) {
381 dvb_unregister_frontend(adap->fe);
382 dvb_frontend_detach(adap->fe);
383 }
384 return 0;
385}
386
Mike Iselyc5317b12008-02-09 19:47:07 -0300387static void pvr2_dvb_destroy(struct pvr2_dvb_adapter *adap)
Mike Isely891d99e2008-02-09 15:44:30 -0300388{
389 pvr2_dvb_stream_end(adap);
390 pvr2_dvb_frontend_exit(adap);
391 pvr2_dvb_adapter_exit(adap);
392 pvr2_channel_done(&adap->channel);
Mike Iselyc5317b12008-02-09 19:47:07 -0300393 kfree(adap);
Mike Isely891d99e2008-02-09 15:44:30 -0300394}
395
396static void pvr2_dvb_internal_check(struct pvr2_channel *chp)
397{
398 struct pvr2_dvb_adapter *adap;
399 adap = container_of(chp, struct pvr2_dvb_adapter, channel);
400 if (!adap->channel.mc_head->disconnect_flag) return;
Mike Iselyc5317b12008-02-09 19:47:07 -0300401 pvr2_dvb_destroy(adap);
Mike Isely891d99e2008-02-09 15:44:30 -0300402}
403
Mike Iselyc5317b12008-02-09 19:47:07 -0300404struct pvr2_dvb_adapter *pvr2_dvb_create(struct pvr2_context *pvr)
Michael Krufky04910bd2008-02-03 23:46:16 -0300405{
406 int ret = 0;
Mike Iselya36416d2008-02-06 06:59:48 -0300407 struct pvr2_dvb_adapter *adap;
Mike Isely129a2f52008-02-09 16:29:52 -0300408 if (!pvr->hdw->hdw_desc->dvb_props) {
409 /* Device lacks a digital interface so don't set up
410 the DVB side of the driver either. For now. */
Mike Iselye6d11862008-02-09 19:47:52 -0300411 return NULL;
Mike Isely129a2f52008-02-09 16:29:52 -0300412 }
Mike Iselyc5317b12008-02-09 19:47:07 -0300413 adap = kzalloc(sizeof(*adap), GFP_KERNEL);
414 if (!adap) return adap;
Mike Iselya36416d2008-02-06 06:59:48 -0300415 pvr2_channel_init(&adap->channel, pvr);
Mike Isely891d99e2008-02-09 15:44:30 -0300416 adap->channel.check_func = pvr2_dvb_internal_check;
Mike Iselya36416d2008-02-06 06:59:48 -0300417 init_waitqueue_head(&adap->buffer_wait_data);
Mike Iselyc5317b12008-02-09 19:47:07 -0300418 mutex_init(&adap->lock);
419 ret = pvr2_dvb_adapter_init(adap);
Mike Isely129a2f52008-02-09 16:29:52 -0300420 if (ret < 0) goto fail1;
Mike Iselyc5317b12008-02-09 19:47:07 -0300421 ret = pvr2_dvb_frontend_init(adap);
Mike Isely129a2f52008-02-09 16:29:52 -0300422 if (ret < 0) goto fail2;
Mike Iselyc5317b12008-02-09 19:47:07 -0300423 return adap;
Mike Isely129a2f52008-02-09 16:29:52 -0300424
425fail2:
426 pvr2_dvb_adapter_exit(adap);
427fail1:
Mike Isely891d99e2008-02-09 15:44:30 -0300428 pvr2_channel_done(&adap->channel);
Mike Iselyc5317b12008-02-09 19:47:07 -0300429 return NULL;
Michael Krufky04910bd2008-02-03 23:46:16 -0300430}
431