summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/sisusbvga/sisusb.h
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-03-28 09:00:21 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 22:04:08 (GMT)
commit2682d27c5884550857cd96231db5b22b3acced53 (patch)
tree94b19f6a04993352d8ce3f189366d9cd4969fb58 /drivers/usb/misc/sisusbvga/sisusb.h
parent7327413c745c2f8e8d4b92f76759821263b095c1 (diff)
downloadlinux-fsl-qoriq-2682d27c5884550857cd96231db5b22b3acced53.tar.xz
[PATCH] USB: convert the semaphores in the sisusb driver to mutexes
From: Arjan van de Ven <arjan@infradead.org> Convert the semaphores-used-as-mutex to mutexes in the sisusb video driver; this required manual checking due to the "return as locked" stuff in this driver, but the ->lock semaphore is still used as mutex in the end. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Cc: Thomas Winischhofer <winischhofer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/sisusbvga/sisusb.h')
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h
index a716825..8e1120a 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.h
+++ b/drivers/usb/misc/sisusbvga/sisusb.h
@@ -41,6 +41,8 @@
#define SISUSB_NEW_CONFIG_COMPAT
#endif
+#include <linux/mutex.h>
+
/* For older kernels, support for text consoles is by default
* off. To ensable text console support, change the following:
*/
@@ -60,11 +62,9 @@
#define INCL_SISUSB_CON 1
#endif
-#ifdef INCL_SISUSB_CON
#include <linux/console.h>
#include <linux/vt_kern.h>
#include "sisusb_struct.h"
-#endif
/* USB related */
@@ -116,7 +116,7 @@ struct sisusb_usb_data {
struct usb_interface *interface;
struct kref kref;
wait_queue_head_t wait_q; /* for syncind and timeouts */
- struct semaphore lock; /* general race avoidance */
+ struct mutex lock; /* general race avoidance */
unsigned int ifnum; /* interface number of the USB device */
int minor; /* minor (for logging clarity) */
int isopen; /* !=0 if open */