From 13454bb6f15bcd4c753c79c7b0e173c41163c635 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 1 Nov 2008 12:25:11 +0100 Subject: v4l: remove inode argument from video_usercopy From: Hans Verkuil The inode argument was never used. Removing it from video_usercopy brings the function pointer type of video_usercopy in line with similar v4l2 functions, thus simplifying several drivers. Priority: normal Signed-off-by: Hans Verkuil --- linux/include/media/saa7146_vv.h | 3 +-- linux/include/media/v4l2-ioctl.h | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'linux/include') diff --git a/linux/include/media/saa7146_vv.h b/linux/include/media/saa7146_vv.h index 1d1040966..6bbb0d93b 100644 --- a/linux/include/media/saa7146_vv.h +++ b/linux/include/media/saa7146_vv.h @@ -216,8 +216,7 @@ void saa7146_set_gpio(struct saa7146_dev *saa, u8 pin, u8 data); extern struct saa7146_use_ops saa7146_video_uops; int saa7146_start_preview(struct saa7146_fh *fh); int saa7146_stop_preview(struct saa7146_fh *fh); -int saa7146_video_do_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, void *arg); +int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg); /* from saa7146_vbi.c */ extern struct saa7146_use_ops saa7146_vbi_uops; diff --git a/linux/include/media/v4l2-ioctl.h b/linux/include/media/v4l2-ioctl.h index e6ba25b3d..f5985724c 100644 --- a/linux/include/media/v4l2-ioctl.h +++ b/linux/include/media/v4l2-ioctl.h @@ -285,10 +285,8 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg); /* Include support for obsoleted stuff */ -extern int video_usercopy(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, - int (*func)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg)); +extern int video_usercopy(struct file *file, unsigned int cmd, + unsigned long arg, v4l2_kioctl func); /* Standard handlers for V4L ioctl's */ -- cgit v1.2.3 From 4309193cab34f5f79808f03e09f8d39a5f2a7288 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 30 Oct 2008 03:51:46 +0000 Subject: V4L: struct device - replace bus_id with dev_name(), dev_set_name() From: Kay Sievers This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. Thanks, Kay Acked-by: Greg Kroah-Hartman Signed-Off-By: Kay Sievers Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/soc_camera.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/include') diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h index c5de7bb19..9231e2d90 100644 --- a/linux/include/media/soc_camera.h +++ b/linux/include/media/soc_camera.h @@ -56,7 +56,7 @@ struct soc_camera_host { struct device dev; unsigned char nr; /* Host number */ void *priv; - char *drv_name; + const char *drv_name; struct soc_camera_host_ops *ops; }; @@ -107,7 +107,7 @@ extern int soc_camera_video_start(struct soc_camera_device *icd); extern void soc_camera_video_stop(struct soc_camera_device *icd); struct soc_camera_data_format { - char *name; + const char *name; unsigned int depth; __u32 fourcc; enum v4l2_colorspace colorspace; -- cgit v1.2.3