X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fcommon%2Fsaa7146_video.c;h=e897131951412ba166496f0ba38dc586134d1493;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=93299758d7ad054d09603cc45dd392739b4feef5;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 93299758d..e89713195 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c @@ -1,9 +1,9 @@ #include -static int memory = 32; +static int max_memory = 32; -MODULE_PARM(memory,"i"); -MODULE_PARM_DESC(memory, "maximum memory usage for capture buffers (default: 32Mb)"); +MODULE_PARM(max_memory,"i"); +MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default: 32Mb)"); #define IS_CAPTURE_ACTIVE(fh) \ (((vv->video_status & STATUS_CAPTURE) != 0) && (vv->video_fh == fh)) @@ -1331,9 +1331,9 @@ static int buffer_setup(struct file *file, unsigned int *count, unsigned int *si *size = fh->video_fmt.sizeimage; - /* check if we exceed the "memory" parameter */ - if( (*count * *size) > (memory*1048576) ) { - *count = (memory*1048576) / *size; + /* check if we exceed the "max_memory" parameter */ + if( (*count * *size) > (max_memory*1048576) ) { + *count = (max_memory*1048576) / *size; } DEB_CAP(("%d buffers, %d bytes each.\n",*count,*size)); @@ -1450,7 +1450,7 @@ static void video_irq_done(struct saa7146_dev *dev, unsigned long st) spin_unlock(&dev->slock); } -static ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos) +static ssize_t video_read(struct file *file, char __user *data, size_t count, loff_t *ppos) { struct saa7146_fh *fh = file->private_data; struct saa7146_dev *dev = fh->dev;