From: Matthias Kaehlcke Date: Thu, 18 Oct 2007 02:40:31 +0000 (-0700) Subject: [SPARC] Videopix Frame Grabber: Convert device_lock_sem to mutex X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7b96dc023a1b487bce59256fde14b8bb28b45aea;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [SPARC] Videopix Frame Grabber: Convert device_lock_sem to mutex Videopix Frame Grabber: Convert the semaphore device_lock_sem to the mutex API Signed-off-by: Matthias Kaehlcke Signed-off-by: David S. Miller --- diff --git a/drivers/sbus/char/vfc.h b/drivers/sbus/char/vfc.h index 63941a259b92..f1aa1389ea4a 100644 --- a/drivers/sbus/char/vfc.h +++ b/drivers/sbus/char/vfc.h @@ -126,7 +126,7 @@ struct vfc_dev { volatile struct vfc_regs __iomem *regs; struct vfc_regs *phys_regs; unsigned int control_reg; - struct semaphore device_lock_sem; + struct mutex device_lock_mtx; int instance; int busy; unsigned long which_io; diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 9269f7fbd363..e7a1642b2aa4 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -54,12 +55,12 @@ static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { void vfc_lock_device(struct vfc_dev *dev) { - down(&dev->device_lock_sem); + mutex_lock(&dev->device_lock_mtx); } void vfc_unlock_device(struct vfc_dev *dev) { - up(&dev->device_lock_sem); + mutex_unlock(&dev->device_lock_mtx); }