diff options
author | Johannes Stezenbach <js@linuxtv.org> | 2005-05-16 21:54:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 07:59:33 -0700 |
commit | fdc53a6dbfea18e621dd23ed5cfb160837d7ce52 (patch) | |
tree | 9ce191cdb07264f8c6275c1443e61b465e17d0cb /drivers/media/dvb/cinergyT2 | |
parent | 0b3f5a57bf110b519b706365c86ada199075f34e (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/dvb/cinergyT2')
-rw-r--r-- | drivers/media/dvb/cinergyT2/cinergyT2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 28d4d926de3e..96c57fde95a0 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c @@ -119,7 +119,7 @@ struct cinergyt2 { struct dvb_demux demux; struct usb_device *udev; struct semaphore sem; - struct dvb_adapter *adapter; + struct dvb_adapter adapter; struct dvb_device *fedev; struct dmxdev dmxdev; struct dvb_net dvbnet; @@ -813,15 +813,15 @@ static int cinergyt2_probe (struct usb_interface *intf, cinergyt2->dmxdev.demux = &cinergyt2->demux.dmx; cinergyt2->dmxdev.capabilities = 0; - if ((err = dvb_dmxdev_init(&cinergyt2->dmxdev, cinergyt2->adapter)) < 0) { + if ((err = dvb_dmxdev_init(&cinergyt2->dmxdev, &cinergyt2->adapter)) < 0) { dprintk(1, "dvb_dmxdev_init() failed (err = %d)\n", err); goto bailout; } - if (dvb_net_init(cinergyt2->adapter, &cinergyt2->dvbnet, &cinergyt2->demux.dmx)) + if (dvb_net_init(&cinergyt2->adapter, &cinergyt2->dvbnet, &cinergyt2->demux.dmx)) dprintk(1, "dvb_net_init() failed!\n"); - dvb_register_device(cinergyt2->adapter, &cinergyt2->fedev, + dvb_register_device(&cinergyt2->adapter, &cinergyt2->fedev, &cinergyt2_fe_template, cinergyt2, DVB_DEVICE_FRONTEND); @@ -848,7 +848,7 @@ static int cinergyt2_probe (struct usb_interface *intf, bailout: dvb_dmxdev_release(&cinergyt2->dmxdev); dvb_dmx_release(&cinergyt2->demux); - dvb_unregister_adapter (cinergyt2->adapter); + dvb_unregister_adapter (&cinergyt2->adapter); cinergyt2_free_stream_urbs (cinergyt2); kfree(cinergyt2); return -ENOMEM; @@ -872,7 +872,7 @@ static void cinergyt2_disconnect (struct usb_interface *intf) dvb_dmxdev_release(&cinergyt2->dmxdev); dvb_dmx_release(&cinergyt2->demux); dvb_unregister_device(cinergyt2->fedev); - dvb_unregister_adapter(cinergyt2->adapter); + dvb_unregister_adapter(&cinergyt2->adapter); cinergyt2_free_stream_urbs(cinergyt2); up(&cinergyt2->sem); |