summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dmxdev.c24
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_demux.c22
2 files changed, 23 insertions, 23 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);
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c
index a6eea1dc4..4c4a2dea8 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c
@@ -24,6 +24,7 @@
#include <asm/uaccess.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
+#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/string.h>
@@ -577,7 +578,7 @@ int dmx_ts_feed_set (struct dmx_ts_feed_s* ts_feed, u16 pid, int ts_type,
#ifdef NOBUFS
feed->buffer=0;
#else
- feed->buffer = kmalloc(feed->buffer_size, GFP_KERNEL);
+ feed->buffer = vmalloc(feed->buffer_size);
if (!feed->buffer) {
up(&demux->mutex);
return -ENOMEM;
@@ -720,7 +721,7 @@ int dvbdmx_release_ts_feed(dmx_demux_t *dmx, dmx_ts_feed_t *ts_feed)
#ifndef NOBUFS
if (feed->buffer) {
- kfree(feed->buffer);
+ vfree(feed->buffer);
feed->buffer=0;
}
#endif
@@ -816,7 +817,7 @@ dmx_section_feed_set(struct dmx_section_feed_s* feed,
#ifdef NOBUFS
dvbdmxfeed->buffer=0;
#else
- dvbdmxfeed->buffer=malloc(dvbdmxfeed->buffer_size, GFP_KERNEL);
+ dvbdmxfeed->buffer=vmalloc(dvbdmxfeed->buffer_size);
if (!dvbdmxfeed->buffer) {
up(&dvbdmx->mutex);
return -ENOMEM;
@@ -999,7 +1000,7 @@ static int dvbdmx_release_section_feed(dmx_demux_t *demux,
}
#ifndef NOBUFS
if (dvbdmxfeed->buffer) {
- kfree(dvbdmxfeed->buffer);
+ vfree(dvbdmxfeed->buffer);
dvbdmxfeed->buffer=0;
}
#endif
@@ -1150,15 +1151,14 @@ dvb_dmx_init(struct dvb_demux *dvbdemux)
dmx_demux_t *dmx=&dvbdemux->dmx;
dvbdemux->users=0;
- dvbdemux->filter=kmalloc(dvbdemux->filternum*sizeof(struct dvb_demux_filter),
- GFP_KERNEL);
+ dvbdemux->filter=vmalloc(dvbdemux->filternum*sizeof(struct dvb_demux_filter));
+
if (!dvbdemux->filter)
return -ENOMEM;
- dvbdemux->feed=kmalloc(dvbdemux->feednum*sizeof(struct dvb_demux_feed),
- GFP_KERNEL);
+ dvbdemux->feed=vmalloc(dvbdemux->feednum*sizeof(struct dvb_demux_feed));
if (!dvbdemux->feed) {
- kfree(dvbdemux->filter);
+ vfree(dvbdemux->filter);
return -ENOMEM;
}
for (i=0; i<dvbdemux->filternum; i++) {
@@ -1221,9 +1221,9 @@ dvb_dmx_release(struct dvb_demux *dvbdemux)
dmx_unregister_demux(dmx);
if (dvbdemux->filter)
- kfree(dvbdemux->filter);
+ vfree(dvbdemux->filter);
if (dvbdemux->feed)
- kfree(dvbdemux->feed);
+ vfree(dvbdemux->feed);
return 0;
}