diff options
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core/dmxdev.c')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dmxdev.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c index 5433e23f9..770b7ce61 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.c +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c @@ -25,6 +25,7 @@ #include <asm/system.h> #include <linux/spinlock.h> #include <linux/slab.h> +#include <linux/vmalloc.h> #include <linux/module.h> #include <linux/sched.h> #include <linux/poll.h> @@ -208,7 +209,7 @@ static int dvb_dvr_open(struct inode *inode, struct file *file) if ((file->f_flags&O_ACCMODE)==O_RDONLY) { dvb_dmxdev_buffer_init(&dmxdev->dvr_buffer); dmxdev->dvr_buffer.size=DVR_BUFFER_SIZE; - dmxdev->dvr_buffer.data=kmalloc(DVR_BUFFER_SIZE, GFP_KERNEL); + dmxdev->dvr_buffer.data=vmalloc(DVR_BUFFER_SIZE); if (!dmxdev->dvr_buffer.data) { up(&dmxdev->mutex); return -ENOMEM; @@ -256,7 +257,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file) spin_lock_irq(&dmxdev->lock); dmxdev->dvr_buffer.data=0; spin_unlock_irq(&dmxdev->lock); - kfree(mem); + vfree(mem); } } up(&dmxdev->mutex); @@ -321,10 +322,10 @@ dvb_dmxdev_set_buffer_size(dmxdev_filter_t *dmxdevfilter, unsigned long size) buf->pwrite=buf->pread=0; spin_unlock_irq(&dmxdevfilter->dev->lock); if (mem) - kfree(mem); + vfree(mem); if (buf->size) { - mem=kmalloc(dmxdevfilter->buffer.size, GFP_KERNEL); + mem=vmalloc(dmxdevfilter->buffer.size); if (!mem) return -ENOMEM; spin_lock_irq(&dmxdevfilter->dev->lock); @@ -563,7 +564,7 @@ dvb_dmxdev_filter_start(dmxdev_filter_t *filter) dvb_dmxdev_filter_stop(filter); if (!(mem = filter->buffer.data)) { - mem = kmalloc(filter->buffer.size, GFP_KERNEL); + mem = vmalloc(filter->buffer.size); spin_lock_irq(&filter->dev->lock); filter->buffer.data=mem; spin_unlock_irq(&filter->dev->lock); @@ -767,7 +768,7 @@ int dvb_dmxdev_filter_free(dmxdev_t *dmxdev, dmxdev_filter_t *dmxdevfilter) spin_lock_irq(&dmxdev->lock); dmxdevfilter->buffer.data=0; spin_unlock_irq(&dmxdev->lock); - kfree(mem); + vfree(mem); } dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_FREE); @@ -1121,15 +1122,14 @@ dvb_dmxdev_init(dmxdev_t *dmxdev, struct dvb_adapter *dvb_adapter) if (dmxdev->demux->open(dmxdev->demux)<0) return -EUSERS; - dmxdev->filter=kmalloc(dmxdev->filternum*sizeof(dmxdev_filter_t), - GFP_KERNEL); + dmxdev->filter=vmalloc(dmxdev->filternum*sizeof(dmxdev_filter_t)); if (!dmxdev->filter) return -ENOMEM; - dmxdev->dvr=kmalloc(dmxdev->filternum*sizeof(dmxdev_dvr_t), GFP_KERNEL); + dmxdev->dvr=vmalloc(dmxdev->filternum*sizeof(dmxdev_dvr_t)); if (!dmxdev->dvr) { - kfree(dmxdev->filter); + vfree(dmxdev->filter); dmxdev->filter=0; return -ENOMEM; } @@ -1159,11 +1159,11 @@ dvb_dmxdev_release(dmxdev_t *dmxdev) dvb_unregister_device(dmxdev->dvbdev); dvb_unregister_device(dmxdev->dvr_dvbdev); if (dmxdev->filter) { - kfree(dmxdev->filter); + vfree(dmxdev->filter); dmxdev->filter=0; } if (dmxdev->dvr) { - kfree(dmxdev->dvr); + vfree(dmxdev->dvr); dmxdev->dvr=0; } dmxdev->demux->close(dmxdev->demux); |