aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-empress.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-empress.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index bd4c389d4c37..1d972edb3be6 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -89,7 +89,7 @@ static int ts_open(struct inode *inode, struct file *file)
89 89
90 dprintk("open minor=%d\n",minor); 90 dprintk("open minor=%d\n",minor);
91 err = -EBUSY; 91 err = -EBUSY;
92 if (down_trylock(&dev->empress_tsq.lock)) 92 if (!mutex_trylock(&dev->empress_tsq.lock))
93 goto done; 93 goto done;
94 if (dev->empress_users) 94 if (dev->empress_users)
95 goto done_up; 95 goto done_up;
@@ -99,7 +99,7 @@ static int ts_open(struct inode *inode, struct file *file)
99 err = 0; 99 err = 0;
100 100
101done_up: 101done_up:
102 up(&dev->empress_tsq.lock); 102 mutex_unlock(&dev->empress_tsq.lock);
103done: 103done:
104 return err; 104 return err;
105} 105}
@@ -110,7 +110,7 @@ static int ts_release(struct inode *inode, struct file *file)
110 110
111 if (dev->empress_tsq.streaming) 111 if (dev->empress_tsq.streaming)
112 videobuf_streamoff(&dev->empress_tsq); 112 videobuf_streamoff(&dev->empress_tsq);
113 down(&dev->empress_tsq.lock); 113 mutex_lock(&dev->empress_tsq.lock);
114 if (dev->empress_tsq.reading) 114 if (dev->empress_tsq.reading)
115 videobuf_read_stop(&dev->empress_tsq); 115 videobuf_read_stop(&dev->empress_tsq);
116 videobuf_mmap_free(&dev->empress_tsq); 116 videobuf_mmap_free(&dev->empress_tsq);
@@ -119,7 +119,7 @@ static int ts_release(struct inode *inode, struct file *file)
119 /* stop the encoder */ 119 /* stop the encoder */
120 ts_reset_encoder(dev); 120 ts_reset_encoder(dev);
121 121
122 up(&dev->empress_tsq.lock); 122 mutex_unlock(&dev->empress_tsq.lock);
123 return 0; 123 return 0;
124} 124}
125 125