Ports the ipw driver from write_urb_busy spin_lock to
usb_serial_write_urb_lock() functions.
Signed-off-by: Luiz Capitulino <[email protected]>
drivers/usb/serial/ipw.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff -Nparu -X /home/lcapitulino/kernels/dontdiff a/drivers/usb/serial/ipw.c a~/drivers/usb/serial/ipw.c
--- a/drivers/usb/serial/ipw.c 2005-12-04 01:44:17.000000000 -0200
+++ a~/drivers/usb/serial/ipw.c 2005-12-04 14:35:49.000000000 -0200
@@ -44,7 +44,6 @@
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
-#include <linux/spinlock.h>
#include <linux/usb.h>
#include <asm/uaccess.h>
#include "usb-serial.h"
@@ -399,14 +398,10 @@ static int ipw_write(struct usb_serial_p
return 0;
}
- spin_lock(&port->lock);
- if (port->write_urb_busy) {
- spin_unlock(&port->lock);
+ if (usb_serial_write_urb_lock(port)) {
dbg("%s - already writing", __FUNCTION__);
return 0;
}
- port->write_urb_busy = 1;
- spin_unlock(&port->lock);
count = min(count, port->bulk_out_size);
memcpy(port->bulk_out_buffer, buf, count);
@@ -422,7 +417,7 @@ static int ipw_write(struct usb_serial_p
ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (ret != 0) {
- port->write_urb_busy = 0;
+ usb_serial_write_urb_unlock(port);
dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, ret);
return ret;
}
--
Luiz Fernando N. Capitulino
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]