From 2a94f8dbe2011b5c5721a9e681a745e25ec3b4e8 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 10 Apr 2007 23:59:09 +0200 Subject: ivtv: fix incorrect bitwise-and for command flags. From: Hans Verkuil Signed-off-by: Hans Verkuil --- linux/drivers/media/video/ivtv/ivtv-ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media/video/ivtv') diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c index d6f0b0235..f29c55d3b 100644 --- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c @@ -289,7 +289,7 @@ static int ivtv_video_command(struct ivtv *itv, struct ivtv_open_id *id, } case VIDEO_CMD_STOP: - vc->flags &= ~(VIDEO_CMD_STOP_IMMEDIATELY|VIDEO_CMD_STOP_TO_BLACK); + vc->flags &= VIDEO_CMD_STOP_IMMEDIATELY|VIDEO_CMD_STOP_TO_BLACK; if (vc->flags & VIDEO_CMD_STOP_IMMEDIATELY) vc->stop.pts = 0; if (try) break; @@ -302,7 +302,7 @@ static int ivtv_video_command(struct ivtv *itv, struct ivtv_open_id *id, return ivtv_stop_v4l2_decode_stream(s, vc->flags, vc->stop.pts); case VIDEO_CMD_FREEZE: - vc->flags &= ~VIDEO_CMD_FREEZE_TO_BLACK; + vc->flags &= VIDEO_CMD_FREEZE_TO_BLACK; if (try) break; if (itv->output_mode != OUT_MPG) return -EBUSY; @@ -1107,7 +1107,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void return ivtv_start_capture(id); case V4L2_ENC_CMD_STOP: - enc->flags &= ~V4L2_ENC_CMD_STOP_AT_GOP_END; + enc->flags &= V4L2_ENC_CMD_STOP_AT_GOP_END; if (try) return 0; ivtv_stop_capture(id, enc->flags & V4L2_ENC_CMD_STOP_AT_GOP_END); -- cgit v1.2.3 From 52cfe1cd4399ded1bff9efe8ff16e7d3917bf463 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 1 May 2007 08:34:15 -0300 Subject: MEDIA: Spinlock initializer cleanup From: Thomas Gleixner Signed-off-by: Thomas Gleixner Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/ivtv/ivtv-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/ivtv') diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c index 4031df6db..8fbc34db5 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.c +++ b/linux/drivers/media/video/ivtv/ivtv-driver.c @@ -74,7 +74,7 @@ int ivtv_first_minor = 0; struct ivtv *ivtv_cards[IVTV_MAX_CARDS]; /* Protects ivtv_cards_active */ -spinlock_t ivtv_cards_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(ivtv_cards_lock); /* add your revision and whatnot here */ static struct pci_device_id ivtv_pci_tbl[] __devinitdata = { -- cgit v1.2.3 From d4618eb817e012165cb72169eb3649e9c9ea7eb8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 2 May 2007 09:47:16 -0300 Subject: VIDEO4LINUX-2: Replace MINOR() with a call to iminor(). From: Robert P. J. Day Replace the call to MINOR() with a call to the inline iminor() routine. Signed-off-by: Robert P. J. Day Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/ivtv/ivtv-fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/ivtv') diff --git a/linux/drivers/media/video/ivtv/ivtv-fileops.c b/linux/drivers/media/video/ivtv/ivtv-fileops.c index 1637097dd..8976487a6 100644 --- a/linux/drivers/media/video/ivtv/ivtv-fileops.c +++ b/linux/drivers/media/video/ivtv/ivtv-fileops.c @@ -804,7 +804,7 @@ int ivtv_v4l2_open(struct inode *inode, struct file *filp) struct ivtv_open_id *item; struct ivtv *itv = NULL; struct ivtv_stream *s = NULL; - int minor = MINOR(inode->i_rdev); + int minor = iminor(inode); /* Find which card this open was on */ spin_lock(&ivtv_cards_lock); -- cgit v1.2.3