Skip to content

Commit

Permalink
V4L/DVB (7376): Improve compile-time type-checking in videobuf
Browse files Browse the repository at this point in the history
Make the dev member of the struct videobuf_queue of type "struct device *"
to avoid future problems. Also change the prototype of the
videobuf_queue_core_init() function.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 50407f9 commit e9bcf66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb,

void videobuf_queue_core_init(struct videobuf_queue *q,
struct videobuf_queue_ops *ops,
void *dev,
struct device *dev,
spinlock_t *irqlock,
enum v4l2_buf_type type,
enum v4l2_field field,
Expand Down
4 changes: 2 additions & 2 deletions include/media/videobuf-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ struct videobuf_qtype_ops {
struct videobuf_queue {
struct mutex vb_lock;
spinlock_t *irqlock;
void *dev; /* on pci, points to struct pci_dev */
struct device *dev;

enum v4l2_buf_type type;
unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */
Expand Down Expand Up @@ -185,7 +185,7 @@ void *videobuf_alloc(struct videobuf_queue* q);

void videobuf_queue_core_init(struct videobuf_queue *q,
struct videobuf_queue_ops *ops,
void *dev,
struct device *dev,
spinlock_t *irqlock,
enum v4l2_buf_type type,
enum v4l2_field field,
Expand Down

0 comments on commit e9bcf66

Please sign in to comment.