V4L/DVB (8338): soc_camera: Move spinlocks
This patch moves the spinlock handling from soc_camera.c to the actual camera host driver. The spinlock_alloc/free callbacks are replaced with code in init_videobuf(). So far all camera host drivers implement their own spinlock_alloc/free methods anyway, and videobuf_queue_core_init() BUGs on a NULL spinlock argument, so, new camera host drivers will not forget to provide a spinlock when initialising their videobuf queues. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
092d392119
commit
a034d1b76b
@@ -48,7 +48,6 @@ struct soc_camera_device {
|
||||
struct soc_camera_file {
|
||||
struct soc_camera_device *icd;
|
||||
struct videobuf_queue vb_vidq;
|
||||
spinlock_t *lock;
|
||||
};
|
||||
|
||||
struct soc_camera_host {
|
||||
@@ -67,15 +66,13 @@ struct soc_camera_host_ops {
|
||||
int (*set_fmt_cap)(struct soc_camera_device *, __u32,
|
||||
struct v4l2_rect *);
|
||||
int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *);
|
||||
void (*init_videobuf)(struct videobuf_queue*, spinlock_t *,
|
||||
void (*init_videobuf)(struct videobuf_queue *,
|
||||
struct soc_camera_device *);
|
||||
int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *);
|
||||
int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
|
||||
int (*try_bus_param)(struct soc_camera_device *, __u32);
|
||||
int (*set_bus_param)(struct soc_camera_device *, __u32);
|
||||
unsigned int (*poll)(struct file *, poll_table *);
|
||||
spinlock_t* (*spinlock_alloc)(struct soc_camera_file *);
|
||||
void (*spinlock_free)(spinlock_t *);
|
||||
};
|
||||
|
||||
struct soc_camera_link {
|
||||
|
Reference in New Issue
Block a user