diff options
author | Thierry MERLE <thierry.merle@free.fr> | 2007-10-24 22:31:15 +0200 |
---|---|---|
committer | Thierry MERLE <thierry.merle@free.fr> | 2007-10-24 22:31:15 +0200 |
commit | 6d67fdc302e1b986dcbd6729167116a4463f1f03 (patch) | |
tree | 6d5340c010830aaa0239c3f5377ce5df625af910 /linux/drivers/media/video/usbvision/usbvision-core.c | |
parent | 70b44e408f0ea27f4e4d5bc627466d25d6221b69 (diff) | |
download | mediapointer-dvb-s2-6d67fdc302e1b986dcbd6729167116a4463f1f03.tar.gz mediapointer-dvb-s2-6d67fdc302e1b986dcbd6729167116a4463f1f03.tar.bz2 |
usbvision: Convert the usbvision->lock semaphore to the mutex API
From: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Convert the usbvision->lock semaphore to the mutex API
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Reviewed-by: Thierry MERLE <thierry.merle@free.fr>
Diffstat (limited to 'linux/drivers/media/video/usbvision/usbvision-core.c')
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c index f83e9bfed..996203969 100644 --- a/linux/drivers/media/video/usbvision/usbvision-core.c +++ b/linux/drivers/media/video/usbvision/usbvision-core.c @@ -2312,14 +2312,18 @@ static void call_usbvision_power_off(struct work_struct *work) #endif PDEBUG(DBG_FUNC, ""); - down_interruptible(&usbvision->lock); + if(mutex_lock_interruptible(&usbvision->lock)) { + return; + } + + if(usbvision->user == 0) { usbvision_i2c_unregister(usbvision); usbvision_power_off(usbvision); usbvision->initialized = 0; } - up(&usbvision->lock); + mutex_unlock(&usbvision->lock); } static void usbvision_powerOffTimer(unsigned long data) |