From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753579AbZJGFBp (ORCPT ); Wed, 7 Oct 2009 01:01:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751789AbZJGFBp (ORCPT ); Wed, 7 Oct 2009 01:01:45 -0400 Received: from smtp-out003.kontent.com ([81.88.40.217]:60366 "EHLO smtp-out003.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbZJGFBo (ORCPT ); Wed, 7 Oct 2009 01:01:44 -0400 From: Oliver Neukum To: Alan Cox , Alan Stern Subject: Re: [PATCH 4/5] usb_serial: Kill port mutex Date: Wed, 7 Oct 2009 07:02:31 +0200 User-Agent: KMail/1.10.3 (Linux/2.6.31-rc9-0.1-default; KDE/4.1.3; x86_64; ; ) Cc: greg@kroah.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org References: <20091006145413.9431.47083.stgit@localhost.localdomain> <20091006150641.9431.67880.stgit@localhost.localdomain> In-Reply-To: <20091006150641.9431.67880.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Message-Id: <200910070702.32266.oliver@neukum.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by alpha.home.local id n9754R16020940 Am Dienstag, 6. Oktober 2009 17:06:46 schrieb Alan Cox:> +++ 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;>  } We will need some generic way to autoresume from open.Resume will need to lock against open() and need to be calledfrom within open(). Any ideas for an unugly interface? Regards Oliver {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I