aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/video-buf-dvb.c
diff options
context:
space:
mode:
authorJohannes Stezenbach <js@linuxtv.org>2005-05-17 00:54:39 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 10:59:33 -0400
commitfdc53a6dbfea18e621dd23ed5cfb160837d7ce52 (patch)
tree9ce191cdb07264f8c6275c1443e61b465e17d0cb /drivers/media/video/video-buf-dvb.c
parent0b3f5a57bf110b519b706365c86ada199075f34e (diff)
[PATCH] dvb: modified dvb_register_adapter() to avoid kmalloc/kfree
Modified dvb_register_adapter() to avoid kmalloc/kfree. Drivers have to embed struct dvb_adapter into their private data struct from now on. (Andreas Oberritter) Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/video-buf-dvb.c')
-rw-r--r--drivers/media/video/video-buf-dvb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/video-buf-dvb.c b/drivers/media/video/video-buf-dvb.c
index 31cc4ed9b747..5f870075b55e 100644
--- a/drivers/media/video/video-buf-dvb.c
+++ b/drivers/media/video/video-buf-dvb.c
@@ -149,10 +149,10 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb,
149 dvb->name, result); 149 dvb->name, result);
150 goto fail_adapter; 150 goto fail_adapter;
151 } 151 }
152 dvb->adapter->priv = adapter_priv; 152 dvb->adapter.priv = adapter_priv;
153 153
154 /* register frontend */ 154 /* register frontend */
155 result = dvb_register_frontend(dvb->adapter, dvb->frontend); 155 result = dvb_register_frontend(&dvb->adapter, dvb->frontend);
156 if (result < 0) { 156 if (result < 0) {
157 printk(KERN_WARNING "%s: dvb_register_frontend failed (errno = %d)\n", 157 printk(KERN_WARNING "%s: dvb_register_frontend failed (errno = %d)\n",
158 dvb->name, result); 158 dvb->name, result);
@@ -178,7 +178,7 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb,
178 dvb->dmxdev.filternum = 256; 178 dvb->dmxdev.filternum = 256;
179 dvb->dmxdev.demux = &dvb->demux.dmx; 179 dvb->dmxdev.demux = &dvb->demux.dmx;
180 dvb->dmxdev.capabilities = 0; 180 dvb->dmxdev.capabilities = 0;
181 result = dvb_dmxdev_init(&dvb->dmxdev, dvb->adapter); 181 result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter);
182 if (result < 0) { 182 if (result < 0) {
183 printk(KERN_WARNING "%s: dvb_dmxdev_init failed (errno = %d)\n", 183 printk(KERN_WARNING "%s: dvb_dmxdev_init failed (errno = %d)\n",
184 dvb->name, result); 184 dvb->name, result);
@@ -209,7 +209,7 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb,
209 } 209 }
210 210
211 /* register network adapter */ 211 /* register network adapter */
212 dvb_net_init(dvb->adapter, &dvb->net, &dvb->demux.dmx); 212 dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
213 return 0; 213 return 0;
214 214
215fail_fe_conn: 215fail_fe_conn:
@@ -223,7 +223,7 @@ fail_dmxdev:
223fail_dmx: 223fail_dmx:
224 dvb_unregister_frontend(dvb->frontend); 224 dvb_unregister_frontend(dvb->frontend);
225fail_frontend: 225fail_frontend:
226 dvb_unregister_adapter(dvb->adapter); 226 dvb_unregister_adapter(&dvb->adapter);
227fail_adapter: 227fail_adapter:
228 return result; 228 return result;
229} 229}
@@ -236,7 +236,7 @@ void videobuf_dvb_unregister(struct videobuf_dvb *dvb)
236 dvb_dmxdev_release(&dvb->dmxdev); 236 dvb_dmxdev_release(&dvb->dmxdev);
237 dvb_dmx_release(&dvb->demux); 237 dvb_dmx_release(&dvb->demux);
238 dvb_unregister_frontend(dvb->frontend); 238 dvb_unregister_frontend(dvb->frontend);
239 dvb_unregister_adapter(dvb->adapter); 239 dvb_unregister_adapter(&dvb->adapter);
240} 240}
241 241
242EXPORT_SYMBOL(videobuf_dvb_register); 242EXPORT_SYMBOL(videobuf_dvb_register);