patch-2.4.6 linux/drivers/usb/serial/keyspan.c
Next file: linux/drivers/usb/serial/keyspan_pda.c
Previous file: linux/drivers/usb/serial/io_edgeport.c
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
Wed Jun 20 16:52:30 2001
- Orig file:
v2.4.5/linux/drivers/usb/serial/keyspan.c
- Orig date:
Mon May 21 15:02:06 2001
diff -u --recursive --new-file v2.4.5/linux/drivers/usb/serial/keyspan.c linux/drivers/usb/serial/keyspan.c
@@ -28,6 +28,9 @@
open source projects.
Change History
+ Thu May 31 11:56:42 PDT 2001 gkh
+ switched from using spinlock to a semaphore
+
(04/08/2001) gb
Identify version on module load.
@@ -177,8 +180,7 @@
usb_serial_register (&keyspan_usa28x_device);
usb_serial_register (&keyspan_usa49w_device);
- info(DRIVER_VERSION " " DRIVER_AUTHOR);
- info(DRIVER_DESC);
+ info(DRIVER_VERSION ":" DRIVER_DESC);
return 0;
}
@@ -833,7 +835,6 @@
struct usb_serial *serial = port->serial;
const keyspan_device_details *d_details;
int i, already_active, err;
- unsigned long flags;
urb_t *urb;
s_priv = (struct keyspan_serial_private *)(serial->private);
@@ -843,11 +844,11 @@
/* dbg("keyspan_open called."); */
MOD_INC_USE_COUNT;
- spin_lock_irqsave (&port->port_lock, flags);
+ down (&port->sem);
++port->open_count;
already_active = port->active;
port->active = 1;
- spin_unlock_irqrestore (&port->port_lock, flags);
+ up (&port->sem);
if (already_active)
return 0;
@@ -887,13 +888,12 @@
struct usb_serial *serial = port->serial; /* FIXME should so sanity check */
struct keyspan_serial_private *s_priv;
struct keyspan_port_private *p_priv;
- unsigned long flags;
/* dbg("keyspan_close called"); */
s_priv = (struct keyspan_serial_private *)(serial->private);
p_priv = (struct keyspan_port_private *)(port->private);
- spin_lock_irqsave (&port->port_lock, flags);
+ down (&port->sem);
if (--port->open_count <= 0) {
if (port->active) {
@@ -914,7 +914,7 @@
port->open_count = 0;
port->tty = 0;
}
- spin_unlock_irqrestore (&port->port_lock, flags);
+ up (&port->sem);
MOD_DEC_USE_COUNT;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)