Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61358
b: refs/heads/master
c: b9378fd
h: refs/heads/master
v: v3
  • Loading branch information
Matthias Kaehlcke authored and Mauro Carvalho Chehab committed Jul 18, 2007
1 parent 935ea5d commit bfe1344
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55c0d1005a0e5f590f71f918e49bdc81362f93a6
refs/heads/master: b9378fdbc334d1575b492108eac822a78c0c46d9
12 changes: 6 additions & 6 deletions trunk/drivers/media/video/pwc/pwc-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
return -EBUSY;
}

down(&pdev->modlock);
mutex_lock(&pdev->modlock);
if (!pdev->usb_init) {
PWC_DEBUG_OPEN("Doing first time initialization.\n");
pdev->usb_init = 1;
Expand Down Expand Up @@ -1131,7 +1131,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
if (i < 0) {
PWC_DEBUG_OPEN("Failed to allocate buffers memory.\n");
pwc_free_buffers(pdev);
up(&pdev->modlock);
mutex_unlock(&pdev->modlock);
return i;
}

Expand Down Expand Up @@ -1172,7 +1172,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
if (i) {
PWC_DEBUG_OPEN("Second attempt at set_video_mode failed.\n");
pwc_free_buffers(pdev);
up(&pdev->modlock);
mutex_unlock(&pdev->modlock);
return i;
}

Expand All @@ -1181,7 +1181,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
PWC_DEBUG_OPEN("Failed to init ISOC stuff = %d.\n", i);
pwc_isoc_cleanup(pdev);
pwc_free_buffers(pdev);
up(&pdev->modlock);
mutex_unlock(&pdev->modlock);
return i;
}

Expand All @@ -1191,7 +1191,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)

pdev->vopen++;
file->private_data = vdev;
up(&pdev->modlock);
mutex_unlock(&pdev->modlock);
PWC_DEBUG_OPEN("<< video_open() returns 0.\n");
return 0;
}
Expand Down Expand Up @@ -1685,7 +1685,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
pdev->angle_range.tilt_max = 2500;
}

init_MUTEX(&pdev->modlock);
mutex_init(&pdev->modlock);
spin_lock_init(&pdev->ptrlock);

pdev->udev = udev;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/pwc/pwc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <linux/wait.h>
#include <linux/smp_lock.h>
#include <linux/version.h>
#include <asm/semaphore.h>
#include <linux/mutex.h>
#include <asm/errno.h>
#include <linux/videodev.h>
#include <media/v4l2-common.h>
Expand Down Expand Up @@ -244,7 +244,7 @@ struct pwc_device
int image_read_pos; /* In case we read data in pieces, keep track of were we are in the imagebuffer */
int image_used[MAX_IMAGES]; /* For MCAPTURE and SYNC */

struct semaphore modlock; /* to prevent races in video_open(), etc */
struct mutex modlock; /* to prevent races in video_open(), etc */
spinlock_t ptrlock; /* for manipulating the buffer pointers */

/*** motorized pan/tilt feature */
Expand Down

0 comments on commit bfe1344

Please sign in to comment.