aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/sisusbvga/sisusb.h
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-03-28 04:00:21 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 18:04:08 -0400
commit2682d27c5884550857cd96231db5b22b3acced53 (patch)
tree94b19f6a04993352d8ce3f189366d9cd4969fb58 /drivers/usb/misc/sisusbvga/sisusb.h
parent7327413c745c2f8e8d4b92f76759821263b095c1 (diff)
[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 a716825d1f9b..8e1120a64806 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.h
+++ b/drivers/usb/misc/sisusbvga/sisusb.h
@@ -41,6 +41,8 @@
41#define SISUSB_NEW_CONFIG_COMPAT 41#define SISUSB_NEW_CONFIG_COMPAT
42#endif 42#endif
43 43
44#include <linux/mutex.h>
45
44/* For older kernels, support for text consoles is by default 46/* For older kernels, support for text consoles is by default
45 * off. To ensable text console support, change the following: 47 * off. To ensable text console support, change the following:
46 */ 48 */
@@ -60,11 +62,9 @@
60#define INCL_SISUSB_CON 1 62#define INCL_SISUSB_CON 1
61#endif 63#endif
62 64
63#ifdef INCL_SISUSB_CON
64#include <linux/console.h> 65#include <linux/console.h>
65#include <linux/vt_kern.h> 66#include <linux/vt_kern.h>
66#include "sisusb_struct.h" 67#include "sisusb_struct.h"
67#endif
68 68
69/* USB related */ 69/* USB related */
70 70
@@ -116,7 +116,7 @@ struct sisusb_usb_data {
116 struct usb_interface *interface; 116 struct usb_interface *interface;
117 struct kref kref; 117 struct kref kref;
118 wait_queue_head_t wait_q; /* for syncind and timeouts */ 118 wait_queue_head_t wait_q; /* for syncind and timeouts */
119 struct semaphore lock; /* general race avoidance */ 119 struct mutex lock; /* general race avoidance */
120 unsigned int ifnum; /* interface number of the USB device */ 120 unsigned int ifnum; /* interface number of the USB device */
121 int minor; /* minor (for logging clarity) */ 121 int minor; /* minor (for logging clarity) */
122 int isopen; /* !=0 if open */ 122 int isopen; /* !=0 if open */