From: Alan Cox <alan@linux.intel.com>
To: greg@kroah.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: [PATCH 4/5] usb_serial: Kill port mutex
Date: Tue, 06 Oct 2009 16:06:46 +0100 [thread overview]
Message-ID: <20091006150641.9431.67880.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091006145413.9431.47083.stgit@localhost.localdomain>
The tty port has a port mutex used for all the port related locking so we
don't need the one in the USB serial layer any more.
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/usb/serial/opticon.c | 4 ++--
drivers/usb/serial/usb-serial.c | 1 -
include/linux/usb/serial.h | 3 ---
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index 1085a57..c3a9ce2 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -498,12 +498,12 @@ static int opticon_resume(struct usb_interface *intf)
struct usb_serial_port *port = serial->port[0];
int result;
- mutex_lock(&port->mutex);
+ mutex_lock(&port->port.mutex);
if (port->port.count)
result = usb_submit_urb(priv->bulk_read_urb, GFP_NOIO);
else
result = 0;
- mutex_unlock(&port->mutex);
+ mutex_unlock(&port->port.mutex);
return result;
}
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index e189338..421ef1f 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -896,7 +896,6 @@ int usb_serial_probe(struct usb_interface *interface,
spin_lock_init(&port->lock);
/* Keep this for private driver use for the moment but
should probably go away */
- mutex_init(&port->mutex);
INIT_WORK(&port->work, usb_serial_port_work);
serial->port[i] = port;
port->dev.parent = &interface->dev;
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index c17eb64..ad24c8c 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -39,8 +39,6 @@ enum port_dev_state {
* @serial: pointer back to the struct usb_serial owner of this port.
* @port: pointer to the corresponding tty_port for this port.
* @lock: spinlock to grab when updating portions of this structure.
- * @mutex: mutex used to synchronize serial_open() and serial_close()
- * access for this port.
* @number: the number of the port (the minor number).
* @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
* @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
@@ -77,7 +75,6 @@ struct usb_serial_port {
struct usb_serial *serial;
struct tty_port port;
spinlock_t lock;
- struct mutex mutex;
unsigned char number;
unsigned char *interrupt_in_buffer;
next prev parent reply other threads:[~2009-10-06 15:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 15:05 [PATCH 0/5] tty_port_open Alan Cox
2009-10-06 15:06 ` [PATCH 1/5] tty_port: add "tty_port_open" helper Alan Cox
2009-10-06 15:06 ` [PATCH 2/5] tty_port: coding style cleaning pass Alan Cox
2009-10-06 15:06 ` [PATCH 3/5] usb_serial: Use the shutdown() operation Alan Cox
2009-10-06 15:06 ` Alan Cox [this message]
2009-10-07 5:02 ` [PATCH 4/5] usb_serial: Kill port mutex Oliver Neukum
2009-10-07 16:03 ` Alan Stern
2009-10-07 16:10 ` Oliver Neukum
2009-10-07 16:34 ` Alan Stern
2009-10-07 16:46 ` Alan Cox
2009-10-07 17:23 ` Alan Stern
2009-10-07 18:25 ` Alan Cox
2009-10-07 18:52 ` Alan Stern
2009-10-07 20:56 ` Oliver Neukum
2009-10-07 21:02 ` Alan Cox
2009-10-07 21:34 ` Alan Stern
2009-10-08 13:43 ` Oliver Neukum
2009-10-08 14:58 ` Alan Stern
2009-10-08 15:27 ` Oliver Neukum
2009-10-08 16:58 ` Alan Stern
2009-10-08 20:06 ` Alan Stern
2009-10-08 20:40 ` Oliver Neukum
2009-10-08 21:19 ` Alan Cox
2009-10-08 21:31 ` Alan Stern
2009-10-08 22:31 ` Alan Cox
2009-10-08 11:37 ` Oliver Neukum
2009-10-06 15:06 ` [PATCH 5/5] opticon: Fix resume logic Alan Cox
2009-10-06 21:12 ` Oliver Neukum
2009-10-06 22:23 ` Alan Cox
2009-10-07 15:56 ` Johan Hovold
2009-10-07 16:01 ` Oliver Neukum
2009-10-07 15:56 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091006150641.9431.67880.stgit@localhost.localdomain \
--to=alan@linux.intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox