Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfb8da8f authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: visor: fix initialisation of UX50/TH55 devices



Fix regression introduced by commit
214916f2 (USB: visor: reimplement using
generic framework) which broke initialisation of UX50/TH55 devices that
used re-mapped bulk-out endpoint addresses.

Reported-by: default avatarRobert Gadsdon <rgadsdon@bayarea.net>
Tested-by: default avatarRobert Gadsdon <rgadsdon@bayarea.net>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 59c6ccd9
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -606,6 +606,10 @@ static int treo_attach(struct usb_serial *serial)


static int clie_5_attach(struct usb_serial *serial)
static int clie_5_attach(struct usb_serial *serial)
{
{
	struct usb_serial_port *port;
	unsigned int pipe;
	int j;

	dbg("%s", __func__);
	dbg("%s", __func__);


	/* TH55 registers 2 ports.
	/* TH55 registers 2 ports.
@@ -621,9 +625,14 @@ static int clie_5_attach(struct usb_serial *serial)
		return -1;
		return -1;


	/* port 0 now uses the modified endpoint Address */
	/* port 0 now uses the modified endpoint Address */
	serial->port[0]->bulk_out_endpointAddress =
	port = serial->port[0];
	port->bulk_out_endpointAddress =
				serial->port[1]->bulk_out_endpointAddress;
				serial->port[1]->bulk_out_endpointAddress;


	pipe = usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress);
	for (j = 0; j < ARRAY_SIZE(port->write_urbs); ++j)
		port->write_urbs[j]->pipe = pipe;

	return 0;
	return 0;
}
}