From 1022e152b0486dbbc19e49c9bbbdec12a0637418 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 2 Apr 2006 09:07:01 -0300 Subject: [PATCH] mark f_ops const in the inode From: Arjan van de Ven Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. kernel-sync Signed-off-by: Arjan van de Ven Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- linux/drivers/media/dvb/dvb-core/dvbdev.c | 2 +- linux/drivers/media/video/videodev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c index 123ea8344..85d6a6c65 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.c +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c @@ -93,7 +93,7 @@ static int dvb_device_open(struct inode *inode, struct file *file) if (dvbdev && dvbdev->fops) { int err = 0; - struct file_operations *old_fops; + const struct file_operations *old_fops; file->private_data = dvbdev; old_fops = file->f_op; diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index 8747de34a..e54b8d9f7 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -111,7 +111,7 @@ static int video_open(struct inode *inode, struct file *file) unsigned int minor = iminor(inode); int err = 0; struct video_device *vfl; - struct file_operations *old_fops; + const struct file_operations *old_fops; if(minor>=VIDEO_NUM_DEVICES) return -ENODEV; -- cgit v1.2.3 From f538287daa555411910d95317990cce75e57225a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 2 Apr 2006 09:35:05 -0300 Subject: cpia2: fix function prototype From: Randy Dunlap Fix address space warning (from sparse): drivers/media/video/cpia2/cpia2_core.c:2355:6: error: symbol 'cpia2_read' redeclared with different type (originally declared at drivers/media/video/cpia2/cpia2.h:458) - incompatible argument 2 (different address spaces) kernel-sync Signed-off-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cpia2/cpia2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/cpia2/cpia2.h b/linux/drivers/media/video/cpia2/cpia2.h index a53056c82..7480c1827 100644 --- a/linux/drivers/media/video/cpia2/cpia2.h +++ b/linux/drivers/media/video/cpia2/cpia2.h @@ -462,7 +462,7 @@ int cpia2_init_camera(struct camera_data *cam); int cpia2_allocate_buffers(struct camera_data *cam); void cpia2_free_buffers(struct camera_data *cam); long cpia2_read(struct camera_data *cam, - char *buf, unsigned long count, int noblock); + char __user *buf, unsigned long count, int noblock); unsigned int cpia2_poll(struct camera_data *cam, struct file *filp, poll_table *wait); int cpia2_remap_buffer(struct camera_data *cam, struct vm_area_struct *vma); -- cgit v1.2.3