Re: USB: serial: ch341: remove reset_resume callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 07, 2012 at 05:56:18PM -0400, Alan Stern wrote:
> On Mon, 7 May 2012, Greg Kroah-Hartman wrote:
> 
> > This really just is the resume callback for the device, so use that,
> > especially as the usb-serial core just overrode this callback so it
> > wasn't being made anyway.
> 
> > --- a/drivers/usb/serial/ch341.c
> > +++ b/drivers/usb/serial/ch341.c
> > @@ -577,27 +577,20 @@ static int ch341_tiocmget(struct tty_struct *tty)
> >  	return result;
> >  }
> >  
> > -
> > -static int ch341_reset_resume(struct usb_interface *intf)
> > +static int ch341_resume(struct usb_serial *serial)
> >  {
> > -	struct usb_device *dev = interface_to_usbdev(intf);
> > -	struct usb_serial *serial = NULL;
> >  	struct ch341_private *priv;
> >  
> > -	serial = usb_get_intfdata(intf);
> >  	priv = usb_get_serial_port_data(serial->port[0]);
> >  
> > -	/*reconfigure ch341 serial port after bus-reset*/
> > -	ch341_configure(dev, priv);
> > -
> > -	usb_serial_resume(intf);
> > +	/* reconfigure ch341 serial port after bus-reset */
> > +	ch341_configure(serial->dev, priv);
> 
> It looks like you're replacing a reset_resume method with a regular 
> resume method.  Is that really the right thing to do?

As only 2 usb-serial drivers have ever implemented reset_resume, and
they both did the same exact thing that their resume functions did, I
think it is safe as resume will be called if reset_resume is not set,
right?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux