@@ -88,15 +88,15 @@ struct ftdi_private {
struct ftdi_sio_quirk {
int (*probe)(struct usb_serial *);
/* Special settings for probed ports. */
- void (*port_probe)(struct ftdi_private *);
+ void (*port_probe)(struct usb_serial_port *);
};
static int ftdi_jtag_probe(struct usb_serial *serial);
static int ftdi_NDI_device_setup(struct usb_serial *serial);
static int ftdi_stmclite_probe(struct usb_serial *serial);
static int ftdi_8u2232c_probe(struct usb_serial *serial);
-static void ftdi_USB_UIRT_setup(struct ftdi_private *priv);
-static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv);
+static void ftdi_USB_UIRT_setup(struct usb_serial_port *port);
+static void ftdi_HE_TIRA1_setup(struct usb_serial_port *port);
static const struct ftdi_sio_quirk ftdi_jtag_quirk = {
.probe = ftdi_jtag_probe,
@@ -2252,11 +2252,11 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)
mutex_init(&priv->cfg_lock);
- if (quirk && quirk->port_probe)
- quirk->port_probe(priv);
-
usb_set_serial_port_data(port, priv);
+ if (quirk && quirk->port_probe)
+ quirk->port_probe(port);
+
ftdi_determine_type(port);
ftdi_set_max_packet_size(port);
if (read_latency_timer(port) < 0)
@@ -2277,8 +2277,10 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)
/* Setup for the USB-UIRT device, which requires hardwired
* baudrate (38400 gets mapped to 312500) */
/* Called from usbserial:serial_probe */
-static void ftdi_USB_UIRT_setup(struct ftdi_private *priv)
+static void ftdi_USB_UIRT_setup(struct usb_serial_port *port)
{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+
priv->flags |= ASYNC_SPD_CUST;
priv->custom_divisor = 77;
priv->force_baud = 38400;
@@ -2287,8 +2289,10 @@ static void ftdi_USB_UIRT_setup(struct ftdi_private *priv)
/* Setup for the HE-TIRA1 device, which requires hardwired
* baudrate (38400 gets mapped to 100000) and RTS-CTS enabled. */
-static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv)
+static void ftdi_HE_TIRA1_setup(struct usb_serial_port *port)
{
+ struct ftdi_private *priv = usb_get_serial_port_data(port);
+
priv->flags |= ASYNC_SPD_CUST;
priv->custom_divisor = 240;
priv->force_baud = 38400;