diff options
author | Johannes Stezenbach <js@linuxtv.org> | 2005-05-17 00:54:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 10:59:33 -0400 |
commit | fdc53a6dbfea18e621dd23ed5cfb160837d7ce52 (patch) | |
tree | 9ce191cdb07264f8c6275c1443e61b465e17d0cb /drivers/media/dvb/cinergyT2/cinergyT2.c | |
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/cinergyT2.c')
-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 { | |||
119 | struct dvb_demux demux; | 119 | struct dvb_demux demux; |
120 | struct usb_device *udev; | 120 | struct usb_device *udev; |
121 | struct semaphore sem; | 121 | struct semaphore sem; |
122 | struct dvb_adapter *adapter; | 122 | struct dvb_adapter adapter; |
123 | struct dvb_device *fedev; | 123 | struct dvb_device *fedev; |
124 | struct dmxdev dmxdev; | 124 | struct dmxdev dmxdev; |
125 | struct dvb_net dvbnet; | 125 | struct dvb_net dvbnet; |
@@ -813,15 +813,15 @@ static int cinergyt2_probe (struct usb_interface *intf, | |||
813 | cinergyt2->dmxdev.demux = &cinergyt2->demux.dmx; | 813 | cinergyt2->dmxdev.demux = &cinergyt2->demux.dmx; |
814 | cinergyt2->dmxdev.capabilities = 0; | 814 | cinergyt2->dmxdev.capabilities = 0; |
815 | 815 | ||
816 | if ((err = dvb_dmxdev_init(&cinergyt2->dmxdev, cinergyt2->adapter)) < 0) { | 816 | if ((err = dvb_dmxdev_init(&cinergyt2->dmxdev, &cinergyt2->adapter)) < 0) { |
817 | dprintk(1, "dvb_dmxdev_init() failed (err = %d)\n", err); | 817 | dprintk(1, "dvb_dmxdev_init() failed (err = %d)\n", err); |
818 | goto bailout; | 818 | goto bailout; |
819 | } | 819 | } |
820 | 820 | ||
821 | if (dvb_net_init(cinergyt2->adapter, &cinergyt2->dvbnet, &cinergyt2->demux.dmx)) | 821 | if (dvb_net_init(&cinergyt2->adapter, &cinergyt2->dvbnet, &cinergyt2->demux.dmx)) |
822 | dprintk(1, "dvb_net_init() failed!\n"); | 822 | dprintk(1, "dvb_net_init() failed!\n"); |
823 | 823 | ||
824 | dvb_register_device(cinergyt2->adapter, &cinergyt2->fedev, | 824 | dvb_register_device(&cinergyt2->adapter, &cinergyt2->fedev, |
825 | &cinergyt2_fe_template, cinergyt2, | 825 | &cinergyt2_fe_template, cinergyt2, |
826 | DVB_DEVICE_FRONTEND); | 826 | DVB_DEVICE_FRONTEND); |
827 | 827 | ||
@@ -848,7 +848,7 @@ static int cinergyt2_probe (struct usb_interface *intf, | |||
848 | bailout: | 848 | bailout: |
849 | dvb_dmxdev_release(&cinergyt2->dmxdev); | 849 | dvb_dmxdev_release(&cinergyt2->dmxdev); |
850 | dvb_dmx_release(&cinergyt2->demux); | 850 | dvb_dmx_release(&cinergyt2->demux); |
851 | dvb_unregister_adapter (cinergyt2->adapter); | 851 | dvb_unregister_adapter (&cinergyt2->adapter); |
852 | cinergyt2_free_stream_urbs (cinergyt2); | 852 | cinergyt2_free_stream_urbs (cinergyt2); |
853 | kfree(cinergyt2); | 853 | kfree(cinergyt2); |
854 | return -ENOMEM; | 854 | return -ENOMEM; |
@@ -872,7 +872,7 @@ static void cinergyt2_disconnect (struct usb_interface *intf) | |||
872 | dvb_dmxdev_release(&cinergyt2->dmxdev); | 872 | dvb_dmxdev_release(&cinergyt2->dmxdev); |
873 | dvb_dmx_release(&cinergyt2->demux); | 873 | dvb_dmx_release(&cinergyt2->demux); |
874 | dvb_unregister_device(cinergyt2->fedev); | 874 | dvb_unregister_device(cinergyt2->fedev); |
875 | dvb_unregister_adapter(cinergyt2->adapter); | 875 | dvb_unregister_adapter(&cinergyt2->adapter); |
876 | 876 | ||
877 | cinergyt2_free_stream_urbs(cinergyt2); | 877 | cinergyt2_free_stream_urbs(cinergyt2); |
878 | up(&cinergyt2->sem); | 878 | up(&cinergyt2->sem); |