From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932847AbcGOMIk (ORCPT ); Fri, 15 Jul 2016 08:08:40 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:36183 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932583AbcGOMIi (ORCPT ); Fri, 15 Jul 2016 08:08:38 -0400 Date: Fri, 15 Jul 2016 14:08:40 +0200 From: Johan Hovold To: Mathieu OTHACEHE Cc: johan@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 21/36] usb: serial: ti_usb_3410_5052: Use generic close function Message-ID: <20160715120840.GL8809@localhost> References: <1463042948-12205-1-git-send-email-m.othacehe@gmail.com> <1463042948-12205-22-git-send-email-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463042948-12205-22-git-send-email-m.othacehe@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 12, 2016 at 10:48:53AM +0200, Mathieu OTHACEHE wrote: > Use usb_serial_generic_close in close callback. > > Signed-off-by: Mathieu OTHACEHE > --- > drivers/usb/serial/ti_usb_3410_5052.c | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c > index 8350c6b..3d36ae7 100644 > --- a/drivers/usb/serial/ti_usb_3410_5052.c > +++ b/drivers/usb/serial/ti_usb_3410_5052.c > @@ -807,24 +807,16 @@ static void ti_close(struct usb_serial_port *port) > { > struct ti_device *tdev; > struct ti_port *tport; > - int port_number; > int status; > int do_unlock; > - unsigned long flags; > > tdev = usb_get_serial_data(port->serial); > tport = usb_get_serial_port_data(port); > > - usb_kill_urb(port->read_urb); > - usb_kill_urb(port->write_urb); > - spin_lock_irqsave(&tport->tp_lock, flags); > - kfifo_reset_out(&port->write_fifo); > - spin_unlock_irqrestore(&tport->tp_lock, flags); > - > - port_number = port->port_number; > + usb_serial_generic_close(port); This change must go with the conversion to use the generic implementations (e.g. in order to kill both read urbs at close, etc). Thanks, Johan