Skip to contentSkip to conversation

usb-serial: removes spin lock 'lock' from usb-serial driver.

PATCH In review Luiz Fernando Capitulino 1 participant 1 message Dec 6, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 9/10 usb-serial: removes spin lock 'lock' from usb-serial driver.

Removes spin lock 'lock' and its initialization from the usb-serial driver.

 drivers/usb/serial/usb-serial.c |    2 --
 drivers/usb/serial/usb-serial.h |    2 --
 2 files changed, 4 deletions(-)
drivers/usb/serial/usb-serial.c +0 -2
diff -Nparu -X /home/lcapitulino/kernels/dontdiff a/drivers/usb/serial/usb-serial.c a~/drivers/usb/serial/usb-serial.c
@@ -26,7 +26,6 @@
 #include <linux/tty_flip.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/spinlock.h>
 #include <linux/list.h>
 #include <linux/smp_lock.h>
 #include <asm/uaccess.h>
@@ -784,7 +783,6 @@ int usb_serial_probe(struct usb_interfac
 		memset(port, 0x00, sizeof(struct usb_serial_port));
 		port->number = i + serial->minor;
 		port->serial = serial;
-		spin_lock_init(&port->lock);
 		sema_init(&port->sem, 1);
 		INIT_WORK(&port->work, usb_serial_port_softint, port);
 		serial->port[i] = port;
drivers/usb/serial/usb-serial.h +0 -2
diff -Nparu -X /home/lcapitulino/kernels/dontdiff a/drivers/usb/serial/usb-serial.h a~/drivers/usb/serial/usb-serial.h
@@ -31,7 +31,6 @@
  * usb_serial_port: structure for the specific ports of a device.
  * @serial: pointer back to the struct usb_serial owner of this port.
  * @tty: pointer to the corresponding tty for this port.
- * @lock: spinlock to grab when updating portions of this structure.
  * @sem: semaphore used to synchronize serial_open() and serial_close()
  *	access for this port.
  * @number: the number of the port (the minor number).
@@ -63,7 +62,6 @@
 struct usb_serial_port {
 	struct usb_serial *	serial;
 	struct tty_struct *	tty;
-	spinlock_t		lock;
 	struct semaphore        sem;
 	unsigned char		number;
 
Signature · 1 line
Luiz Fernando N. Capitulino