aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/istallion.c1
-rw-r--r--drivers/char/nwflash.c11
-rw-r--r--drivers/char/stallion.c1
-rw-r--r--drivers/char/watchdog/pcwd_usb.c7
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 28c5a3193b81..ede128356af2 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -181,7 +181,6 @@ static struct tty_driver *stli_serial;
181 * is already swapping a shared buffer won't make things any worse. 181 * is already swapping a shared buffer won't make things any worse.
182 */ 182 */
183static char *stli_tmpwritebuf; 183static char *stli_tmpwritebuf;
184static DECLARE_MUTEX(stli_tmpwritesem);
185 184
186#define STLI_TXBUFSIZE 4096 185#define STLI_TXBUFSIZE 4096
187 186
diff --git a/drivers/char/nwflash.c b/drivers/char/nwflash.c
index ca41d62b1d9d..8865387d3448 100644
--- a/drivers/char/nwflash.c
+++ b/drivers/char/nwflash.c
@@ -27,6 +27,7 @@
27#include <linux/rwsem.h> 27#include <linux/rwsem.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/smp_lock.h> 29#include <linux/smp_lock.h>
30#include <linux/mutex.h>
30 31
31#include <asm/hardware/dec21285.h> 32#include <asm/hardware/dec21285.h>
32#include <asm/io.h> 33#include <asm/io.h>
@@ -56,7 +57,7 @@ static int gbWriteEnable;
56static int gbWriteBase64Enable; 57static int gbWriteBase64Enable;
57static volatile unsigned char *FLASH_BASE; 58static volatile unsigned char *FLASH_BASE;
58static int gbFlashSize = KFLASH_SIZE; 59static int gbFlashSize = KFLASH_SIZE;
59static DECLARE_MUTEX(nwflash_sem); 60static DEFINE_MUTEX(nwflash_mutex);
60 61
61extern spinlock_t gpio_lock; 62extern spinlock_t gpio_lock;
62 63
@@ -140,7 +141,7 @@ static ssize_t flash_read(struct file *file, char __user *buf, size_t size,
140 /* 141 /*
141 * We now lock against reads and writes. --rmk 142 * We now lock against reads and writes. --rmk
142 */ 143 */
143 if (down_interruptible(&nwflash_sem)) 144 if (mutex_lock_interruptible(&nwflash_mutex))
144 return -ERESTARTSYS; 145 return -ERESTARTSYS;
145 146
146 ret = copy_to_user(buf, (void *)(FLASH_BASE + p), count); 147 ret = copy_to_user(buf, (void *)(FLASH_BASE + p), count);
@@ -149,7 +150,7 @@ static ssize_t flash_read(struct file *file, char __user *buf, size_t size,
149 *ppos += count; 150 *ppos += count;
150 } else 151 } else
151 ret = -EFAULT; 152 ret = -EFAULT;
152 up(&nwflash_sem); 153 mutex_unlock(&nwflash_mutex);
153 } 154 }
154 return ret; 155 return ret;
155} 156}
@@ -188,7 +189,7 @@ static ssize_t flash_write(struct file *file, const char __user *buf,
188 /* 189 /*
189 * We now lock against reads and writes. --rmk 190 * We now lock against reads and writes. --rmk
190 */ 191 */
191 if (down_interruptible(&nwflash_sem)) 192 if (mutex_lock_interruptible(&nwflash_mutex))
192 return -ERESTARTSYS; 193 return -ERESTARTSYS;
193 194
194 written = 0; 195 written = 0;
@@ -277,7 +278,7 @@ static ssize_t flash_write(struct file *file, const char __user *buf,
277 */ 278 */
278 leds_event(led_release); 279 leds_event(led_release);
279 280
280 up(&nwflash_sem); 281 mutex_unlock(&nwflash_mutex);
281 282
282 return written; 283 return written;
283} 284}
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index bdaab6992109..3f5d6077f39c 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -148,7 +148,6 @@ static struct tty_driver *stl_serial;
148 * is already swapping a shared buffer won't make things any worse. 148 * is already swapping a shared buffer won't make things any worse.
149 */ 149 */
150static char *stl_tmpwritebuf; 150static char *stl_tmpwritebuf;
151static DECLARE_MUTEX(stl_tmpwritesem);
152 151
153/* 152/*
154 * Define a local default termios struct. All ports will be created 153 * Define a local default termios struct. All ports will be created
diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c
index 1533f56baa42..2700c5c45b8a 100644
--- a/drivers/char/watchdog/pcwd_usb.c
+++ b/drivers/char/watchdog/pcwd_usb.c
@@ -42,6 +42,7 @@
42#include <linux/completion.h> 42#include <linux/completion.h>
43#include <asm/uaccess.h> 43#include <asm/uaccess.h>
44#include <linux/usb.h> 44#include <linux/usb.h>
45#include <linux/mutex.h>
45 46
46 47
47#ifdef CONFIG_USB_DEBUG 48#ifdef CONFIG_USB_DEBUG
@@ -143,7 +144,7 @@ struct usb_pcwd_private {
143static struct usb_pcwd_private *usb_pcwd_device; 144static struct usb_pcwd_private *usb_pcwd_device;
144 145
145/* prevent races between open() and disconnect() */ 146/* prevent races between open() and disconnect() */
146static DECLARE_MUTEX (disconnect_sem); 147static DEFINE_MUTEX(disconnect_mutex);
147 148
148/* local function prototypes */ 149/* local function prototypes */
149static int usb_pcwd_probe (struct usb_interface *interface, const struct usb_device_id *id); 150static int usb_pcwd_probe (struct usb_interface *interface, const struct usb_device_id *id);
@@ -723,7 +724,7 @@ static void usb_pcwd_disconnect(struct usb_interface *interface)
723 struct usb_pcwd_private *usb_pcwd; 724 struct usb_pcwd_private *usb_pcwd;
724 725
725 /* prevent races with open() */ 726 /* prevent races with open() */
726 down (&disconnect_sem); 727 mutex_lock(&disconnect_mutex);
727 728
728 usb_pcwd = usb_get_intfdata (interface); 729 usb_pcwd = usb_get_intfdata (interface);
729 usb_set_intfdata (interface, NULL); 730 usb_set_intfdata (interface, NULL);
@@ -749,7 +750,7 @@ static void usb_pcwd_disconnect(struct usb_interface *interface)
749 750
750 cards_found--; 751 cards_found--;
751 752
752 up (&disconnect_sem); 753 mutex_unlock(&disconnect_mutex);
753 754
754 printk(KERN_INFO PFX "USB PC Watchdog disconnected\n"); 755 printk(KERN_INFO PFX "USB PC Watchdog disconnected\n");
755} 756}