ChangeSet 1.1123.18.10, 2003/08/13 10:09:36-07:00, greg@kroah.com [PATCH] USB: fix up usb-serial drivers now that port[] is an array of pointers. drivers/usb/serial/belkin_sa.c | 6 +++--- drivers/usb/serial/cyberjack.c | 8 ++++---- drivers/usb/serial/digi_acceleport.c | 20 ++++++++++---------- drivers/usb/serial/ftdi_sio.c | 16 ++++++++-------- drivers/usb/serial/generic.c | 2 +- drivers/usb/serial/io_edgeport.c | 16 ++++++++-------- drivers/usb/serial/io_ti.c | 16 ++++++++-------- drivers/usb/serial/keyspan.c | 18 +++++++++--------- drivers/usb/serial/keyspan_pda.c | 10 +++++----- drivers/usb/serial/kl5kusb105.c | 8 ++++---- drivers/usb/serial/kobil_sct.c | 12 ++++++------ drivers/usb/serial/mct_u232.c | 8 ++++---- drivers/usb/serial/omninet.c | 8 ++++---- drivers/usb/serial/pl2303.c | 6 +++--- drivers/usb/serial/visor.c | 26 +++++++++++++------------- drivers/usb/serial/whiteheat.c | 16 ++++++++-------- 16 files changed, 98 insertions(+), 98 deletions(-) diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c --- a/drivers/usb/serial/belkin_sa.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/belkin_sa.c Fri Aug 15 10:46:47 2003 @@ -189,8 +189,8 @@ priv->bad_flow_control = (dev->descriptor.bcdDevice <= 0x0206) ? 1 : 0; info("bcdDevice: %04x, bfc: %d", dev->descriptor.bcdDevice, priv->bad_flow_control); - init_waitqueue_head(&serial->port->write_wait); - usb_set_serial_port_data(serial->port, priv); + init_waitqueue_head(&serial->port[0]->write_wait); + usb_set_serial_port_data(serial->port[0], priv); return (0); } @@ -206,7 +206,7 @@ /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { /* My special items, the standard routines free my urbs */ - priv = usb_get_serial_port_data(&serial->port[i]); + priv = usb_get_serial_port_data(serial->port[i]); if (priv) kfree(priv); } diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c --- a/drivers/usb/serial/cyberjack.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/cyberjack.c Fri Aug 15 10:46:47 2003 @@ -123,9 +123,9 @@ priv->rdtodo = 0; priv->wrfilled = 0; priv->wrsent = 0; - usb_set_serial_port_data(serial->port, priv); + usb_set_serial_port_data(serial->port[0], priv); - init_waitqueue_head(&serial->port->write_wait); + init_waitqueue_head(&serial->port[0]->write_wait); return( 0 ); } @@ -138,8 +138,8 @@ for (i=0; i < serial->num_ports; ++i) { /* My special items, the standard routines free my urbs */ - kfree(usb_get_serial_port_data(&serial->port[i])); - usb_set_serial_port_data(&serial->port[i], NULL); + kfree(usb_get_serial_port_data(serial->port[i])); + usb_set_serial_port_data(serial->port[i], NULL); } } diff -Nru a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c --- a/drivers/usb/serial/digi_acceleport.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/digi_acceleport.c Fri Aug 15 10:46:47 2003 @@ -1675,7 +1675,7 @@ /* set USB_DISABLE_SPD flag for write bulk urbs */ for( i=0; itype->num_ports+1; i++ ) { - port = &serial->port[i]; + port = serial->port[i]; port->write_urb->dev = port->serial->dev; @@ -1711,7 +1711,7 @@ GFP_KERNEL ); if( priv == (struct digi_port *)0 ) { while( --i >= 0 ) - kfree( usb_get_serial_port_data(&serial->port[i]) ); + kfree( usb_get_serial_port_data(serial->port[i]) ); return( 1 ); /* error */ } @@ -1734,9 +1734,9 @@ (void *)(&serial->port[i])); /* initialize write wait queue for this port */ - init_waitqueue_head( &serial->port[i].write_wait ); + init_waitqueue_head( &serial->port[i]->write_wait ); - usb_set_serial_port_data(&serial->port[i], priv); + usb_set_serial_port_data(serial->port[i], priv); } /* allocate serial private structure */ @@ -1744,14 +1744,14 @@ GFP_KERNEL ); if( serial_priv == (struct digi_serial *)0 ) { for( i=0; itype->num_ports+1; i++ ) - kfree( usb_get_serial_port_data(&serial->port[i]) ); + kfree( usb_get_serial_port_data(serial->port[i]) ); return( 1 ); /* error */ } /* initialize serial private structure */ spin_lock_init( &serial_priv->ds_serial_lock ); serial_priv->ds_oob_port_num = serial->type->num_ports; - serial_priv->ds_oob_port = &serial->port[serial_priv->ds_oob_port_num]; + serial_priv->ds_oob_port = serial->port[serial_priv->ds_oob_port_num]; serial_priv->ds_device_started = 0; usb_set_serial_data(serial, serial_priv); @@ -1770,14 +1770,14 @@ /* stop reads and writes on all ports */ for( i=0; itype->num_ports+1; i++ ) { - usb_unlink_urb( serial->port[i].read_urb ); - usb_unlink_urb( serial->port[i].write_urb ); + usb_unlink_urb( serial->port[i]->read_urb ); + usb_unlink_urb( serial->port[i]->write_urb ); } /* free the private data structures for all ports */ /* number of regular ports + 1 for the out-of-band port */ for( i=0; itype->num_ports+1; i++ ) - kfree( usb_get_serial_port_data(&serial->port[i]) ); + kfree( usb_get_serial_port_data(serial->port[i]) ); kfree( usb_get_serial_data(serial) ); } @@ -1980,7 +1980,7 @@ if( status != 0 || line >= serial->type->num_ports ) continue; - port = &serial->port[line]; + port = serial->port[line]; if( port_paranoia_check( port, __FUNCTION__ ) || (priv=usb_get_serial_port_data(port)) == NULL ) diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c --- a/drivers/usb/serial/ftdi_sio.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/ftdi_sio.c Fri Aug 15 10:46:47 2003 @@ -981,7 +981,7 @@ /* Called from ftdi_SIO_startup, etc. */ static int ftdi_common_startup (struct usb_serial *serial) { - struct usb_serial_port *port = &serial->port[0]; + struct usb_serial_port *port = serial->port[0]; struct ftdi_private *priv; dbg("%s",__FUNCTION__); @@ -1022,7 +1022,7 @@ port->bulk_out_buffer = NULL; } - usb_set_serial_port_data(serial->port, priv); + usb_set_serial_port_data(serial->port[0], priv); return (0); } @@ -1042,7 +1042,7 @@ return (err); } - priv = usb_get_serial_port_data(serial->port); + priv = usb_get_serial_port_data(serial->port[0]); priv->chip_type = SIO; priv->baud_base = 12000000 / 16; priv->write_offset = 1; @@ -1063,7 +1063,7 @@ return (err); } - priv = usb_get_serial_port_data(serial->port); + priv = usb_get_serial_port_data(serial->port[0]); priv->chip_type = FT8U232AM; priv->baud_base = 48000000 / 2; /* Would be / 16, but FTDI supports 0.125, 0.25 and 0.5 divisor fractions! */ @@ -1083,7 +1083,7 @@ return (err); } - priv = usb_get_serial_port_data(serial->port); + priv = usb_get_serial_port_data(serial->port[0]); priv->chip_type = FT232BM; priv->baud_base = 48000000 / 2; /* Would be / 16, but FT232BM supports multiple of 0.125 divisor fractions! */ @@ -1103,7 +1103,7 @@ return (err); } - priv = usb_get_serial_port_data(serial->port); + priv = usb_get_serial_port_data(serial->port[0]); priv->flags |= ASYNC_SPD_CUST; priv->custom_divisor = 77; priv->force_baud = B38400; @@ -1124,7 +1124,7 @@ return (err); } - priv = usb_get_serial_port_data(serial->port); + priv = usb_get_serial_port_data(serial->port[0]); priv->flags |= ASYNC_SPD_CUST; priv->custom_divisor = 240; priv->force_baud = B38400; @@ -1146,7 +1146,7 @@ static void ftdi_shutdown (struct usb_serial *serial) { /* ftdi_shutdown */ - struct usb_serial_port *port = serial->port; + struct usb_serial_port *port = serial->port[0]; struct ftdi_private *priv = usb_get_serial_port_data(port); dbg("%s", __FUNCTION__); diff -Nru a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c --- a/drivers/usb/serial/generic.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/generic.c Fri Aug 15 10:46:47 2003 @@ -300,7 +300,7 @@ /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { - generic_cleanup (&serial->port[i]); + generic_cleanup(serial->port[i]); } } diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c --- a/drivers/usb/serial/io_edgeport.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/io_edgeport.c Fri Aug 15 10:46:47 2003 @@ -824,7 +824,7 @@ while ((position < length) && (portNumber < edge_serial->serial->num_ports)) { txCredits = data[position] | (data[position+1] << 8); if (txCredits) { - port = &edge_serial->serial->port[portNumber]; + port = edge_serial->serial->port[portNumber]; if (port_paranoia_check (port, __FUNCTION__) == 0) { edge_port = usb_get_serial_port_data(port); if (edge_port->open) { @@ -1031,7 +1031,7 @@ return -ENODEV; } if (edge_serial->interrupt_in_buffer == NULL) { - struct usb_serial_port *port0 = &serial->port[0]; + struct usb_serial_port *port0 = serial->port[0]; /* not set up yet, so do it now */ edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer; @@ -2065,7 +2065,7 @@ /* spit this data back into the tty driver if this port is open */ if (rxLen) { - port = &edge_serial->serial->port[edge_serial->rxPort]; + port = edge_serial->serial->port[edge_serial->rxPort]; if (port_paranoia_check (port, __FUNCTION__) == 0) { edge_port = usb_get_serial_port_data(port); if (edge_port->open) { @@ -2118,7 +2118,7 @@ __u8 code = edge_serial->rxStatusCode; /* switch the port pointer to the one being currently talked about */ - port = &edge_serial->serial->port[edge_serial->rxPort]; + port = edge_serial->serial->port[edge_serial->rxPort]; if (port_paranoia_check (port, __FUNCTION__)) { return; } @@ -3018,8 +3018,8 @@ return -ENOMEM; } memset (edge_port, 0, sizeof(struct edgeport_port)); - edge_port->port = &serial->port[i]; - usb_set_serial_port_data(&serial->port[i], edge_port); + edge_port->port = serial->port[i]; + usb_set_serial_port_data(serial->port[i], edge_port); } return 0; @@ -3039,8 +3039,8 @@ /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { - kfree (usb_get_serial_port_data(&serial->port[i])); - usb_set_serial_port_data(&serial->port[i], NULL); + kfree (usb_get_serial_port_data(serial->port[i])); + usb_set_serial_port_data(serial->port[i], NULL); } kfree (usb_get_serial_data(serial)); usb_set_serial_data(serial, NULL); diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c --- a/drivers/usb/serial/io_ti.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/io_ti.c Fri Aug 15 10:46:47 2003 @@ -924,7 +924,7 @@ status = usb_bulk_msg (serial->dev, usb_sndbulkpipe(serial->dev, - serial->port[0].bulk_out_endpointAddress), + serial->port[0]->bulk_out_endpointAddress), buffer, length, num_sent, @@ -1682,7 +1682,7 @@ function = TIUMP_GET_FUNC_FROM_CODE (data[0]); dbg ("%s - port_number %d, function %d, info 0x%x", __FUNCTION__, port_number, function, data[1]); - port = &edge_serial->serial->port[port_number]; + port = edge_serial->serial->port[port_number]; if (port_paranoia_check (port, __FUNCTION__)) { dbg ("%s - change found for port that is not present", __FUNCTION__); @@ -1945,7 +1945,7 @@ edge_serial = edge_port->edge_serial; if (edge_serial->num_ports_open == 0) { /* we are the first port to be opened, let's post the interrupt urb */ - urb = edge_serial->serial->port[0].interrupt_in_urb; + urb = edge_serial->serial->port[0]->interrupt_in_urb; if (!urb) { dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__); return -EINVAL; @@ -2034,7 +2034,7 @@ --edge_port->edge_serial->num_ports_open; if (edge_port->edge_serial->num_ports_open <= 0) { /* last port is now closed, let's shut down our interrupt urb */ - usb_unlink_urb (serial->port[0].interrupt_in_urb); + usb_unlink_urb (serial->port[0]->interrupt_in_urb); edge_port->edge_serial->num_ports_open = 0; } edge_port->close_pending = 0; @@ -2603,9 +2603,9 @@ return -ENOMEM; } memset (edge_port, 0, sizeof(struct edgeport_port)); - edge_port->port = &serial->port[i]; + edge_port->port = serial->port[i]; edge_port->edge_serial = edge_serial; - usb_set_serial_port_data(&serial->port[i], edge_port); + usb_set_serial_port_data(serial->port[i], edge_port); } return 0; @@ -2618,8 +2618,8 @@ dbg ("%s", __FUNCTION__); for (i=0; i < serial->num_ports; ++i) { - kfree (usb_get_serial_port_data(&serial->port[i])); - usb_set_serial_port_data(&serial->port[i], NULL); + kfree (usb_get_serial_port_data(serial->port[i])); + usb_set_serial_port_data(serial->port[i], NULL); } kfree (usb_get_serial_data(serial)); usb_set_serial_data(serial, NULL); diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c --- a/drivers/usb/serial/keyspan.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/keyspan.c Fri Aug 15 10:46:47 2003 @@ -523,7 +523,7 @@ dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port); goto exit; } - port = &serial->port[msg->port]; + port = serial->port[msg->port]; p_priv = usb_get_serial_port_data(port); /* Update handshaking pin state information */ @@ -658,7 +658,7 @@ dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port); goto exit; } - port = &serial->port[msg->port]; + port = serial->port[msg->port]; p_priv = usb_get_serial_port_data(port); /* Update handshaking pin state information */ @@ -701,7 +701,7 @@ serial = (struct usb_serial *) urb->context; for (i = 0; i < serial->num_ports; ++i) { - port = &serial->port[i]; + port = serial->port[i]; p_priv = usb_get_serial_port_data(port); if (p_priv->resend_cont) { @@ -750,7 +750,7 @@ dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->portNumber); goto exit; } - port = &serial->port[msg->portNumber]; + port = serial->port[msg->portNumber]; p_priv = usb_get_serial_port_data(port); /* Update handshaking pin state information */ @@ -1188,7 +1188,7 @@ /* Setup endpoints for each port specific thing */ for (i = 0; i < d_details->num_ports; i ++) { - port = &serial->port[i]; + port = serial->port[i]; p_priv = usb_get_serial_port_data(port); /* Do indat endpoints first, once for each flip */ @@ -1893,7 +1893,7 @@ /* Now setup per port private data */ for (i = 0; i < serial->num_ports; i++) { - port = &serial->port[i]; + port = serial->port[i]; p_priv = kmalloc(sizeof(struct keyspan_port_private), GFP_KERNEL); if (!p_priv) { dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i); @@ -1929,7 +1929,7 @@ stop_urb(s_priv->instat_urb); stop_urb(s_priv->glocont_urb); for (i = 0; i < serial->num_ports; ++i) { - port = &serial->port[i]; + port = serial->port[i]; p_priv = usb_get_serial_port_data(port); stop_urb(p_priv->inack_urb); stop_urb(p_priv->outcont_urb); @@ -1945,7 +1945,7 @@ if (s_priv->glocont_urb) usb_free_urb(s_priv->glocont_urb); for (i = 0; i < serial->num_ports; ++i) { - port = &serial->port[i]; + port = serial->port[i]; p_priv = usb_get_serial_port_data(port); if (p_priv->inack_urb) usb_free_urb(p_priv->inack_urb); @@ -1965,7 +1965,7 @@ /* dbg("Freeing port->private."); */ /* Now free per port private data */ for (i = 0; i < serial->num_ports; i++) { - port = &serial->port[i]; + port = serial->port[i]; kfree(usb_get_serial_port_data(port)); } } diff -Nru a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c --- a/drivers/usb/serial/keyspan_pda.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/keyspan_pda.c Fri Aug 15 10:46:47 2003 @@ -264,7 +264,7 @@ case 0: /* rest of message is rx data */ if (urb->actual_length) { - tty = serial->port[0].tty; + tty = serial->port[0]->tty; for (i = 1; i < urb->actual_length ; ++i) { tty_insert_flip_char(tty, data[i], 0); } @@ -278,7 +278,7 @@ case 1: /* modemline change */ break; case 2: /* tx unthrottle interrupt */ - tty = serial->port[0].tty; + tty = serial->port[0]->tty; priv->tx_throttled = 0; /* queue up a wakeup at scheduler time */ schedule_work(&priv->wakeup_work); @@ -801,8 +801,8 @@ priv = kmalloc(sizeof(struct keyspan_pda_private), GFP_KERNEL); if (!priv) return (1); /* error */ - usb_set_serial_port_data(&serial->port[0], priv); - init_waitqueue_head(&serial->port[0].write_wait); + usb_set_serial_port_data(serial->port[0], priv); + init_waitqueue_head(&serial->port[0]->write_wait); INIT_WORK(&priv->wakeup_work, (void *)keyspan_pda_wakeup_write, (void *)(&serial->port[0])); INIT_WORK(&priv->unthrottle_work, @@ -815,7 +815,7 @@ { dbg("%s", __FUNCTION__); - kfree(usb_get_serial_port_data(&serial->port[0])); + kfree(usb_get_serial_port_data(serial->port[0])); } #ifdef KEYSPAN diff -Nru a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c --- a/drivers/usb/serial/kl5kusb105.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/kl5kusb105.c Fri Aug 15 10:46:47 2003 @@ -290,7 +290,7 @@ priv->bytes_in = 0; priv->bytes_out = 0; - usb_set_serial_port_data(&serial->port[i], priv); + usb_set_serial_port_data(serial->port[i], priv); spin_lock_init (&priv->lock); for (i=0; itermios is left uninitalized until port opening */ - init_waitqueue_head(&serial->port[i].write_wait); + init_waitqueue_head(&serial->port[i]->write_wait); } return (0); @@ -327,7 +327,7 @@ /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { - struct klsi_105_private *priv = usb_get_serial_port_data(&serial->port[i]); + struct klsi_105_private *priv = usb_get_serial_port_data(serial->port[i]); unsigned long flags; if (priv) { @@ -354,7 +354,7 @@ spin_unlock_irqrestore (&priv->lock, flags); kfree(priv); - usb_set_serial_port_data(&serial->port[i], NULL); + usb_set_serial_port_data(serial->port[i], NULL); } } } /* klsi_105_shutdown */ diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c --- a/drivers/usb/serial/kobil_sct.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/kobil_sct.c Fri Aug 15 10:46:47 2003 @@ -177,7 +177,7 @@ printk(KERN_DEBUG "KOBIL KAAN SIM detected\n"); break; } - usb_set_serial_port_data(serial->port, priv); + usb_set_serial_port_data(serial->port[0], priv); // search for the necessary endpoints pdev = serial->dev; @@ -206,14 +206,14 @@ static void kobil_shutdown (struct usb_serial *serial) { int i; - dbg("%s - port %d", __FUNCTION__, serial->port->number); + dbg("%s - port %d", __FUNCTION__, serial->port[0]->number); for (i=0; i < serial->num_ports; ++i) { - while (serial->port[i].open_count > 0) { - kobil_close (&serial->port[i], NULL); + while (serial->port[i]->open_count > 0) { + kobil_close (serial->port[i], NULL); } - kfree(usb_get_serial_port_data(&serial->port[i])); - usb_set_serial_port_data(&serial->port[i], NULL); + kfree(usb_get_serial_port_data(serial->port[i])); + usb_set_serial_port_data(serial->port[i], NULL); } } diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c --- a/drivers/usb/serial/mct_u232.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/mct_u232.c Fri Aug 15 10:46:47 2003 @@ -320,9 +320,9 @@ priv->control_state = 0; priv->last_lsr = 0; priv->last_msr = 0; - usb_set_serial_port_data(serial->port, priv); + usb_set_serial_port_data(serial->port[0], priv); - init_waitqueue_head(&serial->port->write_wait); + init_waitqueue_head(&serial->port[0]->write_wait); return (0); } /* mct_u232_startup */ @@ -337,7 +337,7 @@ for (i=0; i < serial->num_ports; ++i) { /* My special items, the standard routines free my urbs */ - priv = usb_get_serial_port_data(&serial->port[i]); + priv = usb_get_serial_port_data(serial->port[i]); if (priv) kfree(priv); } @@ -393,7 +393,7 @@ { /* Puh, that's dirty */ struct usb_serial_port *rport; - rport = &serial->port[1]; + rport = serial->port[1]; rport->tty = port->tty; usb_set_serial_port_data(rport, usb_get_serial_port_data(port)); port->read_urb = rport->interrupt_in_urb; diff -Nru a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c --- a/drivers/usb/serial/omninet.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/omninet.c Fri Aug 15 10:46:47 2003 @@ -170,7 +170,7 @@ } usb_set_serial_port_data(port, od); - wport = &serial->port[1]; + wport = serial->port[1]; wport->tty = port->tty; /* Start reading from the device */ @@ -201,7 +201,7 @@ return; if (serial->dev) { - wport = &serial->port[1]; + wport = serial->port[1]; usb_unlink_urb (wport->write_urb); usb_unlink_urb (port->read_urb); } @@ -271,7 +271,7 @@ static int omninet_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count) { struct usb_serial *serial = port->serial; - struct usb_serial_port *wport = &serial->port[1]; + struct usb_serial_port *wport = serial->port[1]; struct omninet_data *od = usb_get_serial_port_data(port); struct omninet_header *header = (struct omninet_header *) wport->write_urb->transfer_buffer; @@ -326,7 +326,7 @@ static int omninet_write_room (struct usb_serial_port *port) { struct usb_serial *serial = port->serial; - struct usb_serial_port *wport = &serial->port[1]; + struct usb_serial_port *wport = serial->port[1]; int room = 0; // Default: no room diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c --- a/drivers/usb/serial/pl2303.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/pl2303.c Fri Aug 15 10:46:47 2003 @@ -186,7 +186,7 @@ return -ENOMEM; memset (priv, 0x00, sizeof (struct pl2303_private)); spin_lock_init(&priv->lock); - usb_set_serial_port_data(&serial->port[i], priv); + usb_set_serial_port_data(serial->port[i], priv); } return 0; } @@ -592,8 +592,8 @@ dbg("%s", __FUNCTION__); for (i = 0; i < serial->num_ports; ++i) { - kfree (usb_get_serial_port_data(&serial->port[i])); - usb_set_serial_port_data(&serial->port[i], NULL); + kfree (usb_get_serial_port_data(serial->port[i])); + usb_set_serial_port_data(serial->port[i], NULL); } } diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/visor.c Fri Aug 15 10:46:47 2003 @@ -850,25 +850,25 @@ * "virtual serial port". So let's force the endpoints to be * where we want them to be. */ for (i = serial->num_bulk_in; i < serial->num_ports; ++i) { - port = &serial->port[i]; - port->read_urb = serial->port[0].read_urb; - port->bulk_in_endpointAddress = serial->port[0].bulk_in_endpointAddress; - port->bulk_in_buffer = serial->port[0].bulk_in_buffer; + port = serial->port[i]; + port->read_urb = serial->port[0]->read_urb; + port->bulk_in_endpointAddress = serial->port[0]->bulk_in_endpointAddress; + port->bulk_in_buffer = serial->port[0]->bulk_in_buffer; } for (i = serial->num_bulk_out; i < serial->num_ports; ++i) { - port = &serial->port[i]; - port->write_urb = serial->port[0].write_urb; - port->bulk_out_size = serial->port[0].bulk_out_size; - port->bulk_out_endpointAddress = serial->port[0].bulk_out_endpointAddress; - port->bulk_out_buffer = serial->port[0].bulk_out_buffer; + port = serial->port[i]; + port->write_urb = serial->port[0]->write_urb; + port->bulk_out_size = serial->port[0]->bulk_out_size; + port->bulk_out_endpointAddress = serial->port[0]->bulk_out_endpointAddress; + port->bulk_out_buffer = serial->port[0]->bulk_out_buffer; } for (i = serial->num_interrupt_in; i < serial->num_ports; ++i) { - port = &serial->port[i]; - port->interrupt_in_urb = serial->port[0].interrupt_in_urb; - port->interrupt_in_endpointAddress = serial->port[0].interrupt_in_endpointAddress; - port->interrupt_in_buffer = serial->port[0].interrupt_in_buffer; + port = serial->port[i]; + port->interrupt_in_urb = serial->port[0]->interrupt_in_urb; + port->interrupt_in_endpointAddress = serial->port[0]->interrupt_in_endpointAddress; + port->interrupt_in_buffer = serial->port[0]->interrupt_in_buffer; } return 0; diff -Nru a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c --- a/drivers/usb/serial/whiteheat.c Fri Aug 15 10:46:47 2003 +++ b/drivers/usb/serial/whiteheat.c Fri Aug 15 10:46:47 2003 @@ -361,7 +361,7 @@ struct whiteheat_urb_wrap *wrap; struct list_head *tmp; - command_port = &serial->port[COMMAND_PORT]; + command_port = serial->port[COMMAND_PORT]; pipe = usb_sndbulkpipe (serial->dev, command_port->bulk_out_endpointAddress); /* @@ -400,7 +400,7 @@ DRIVER_VERSION, hw_info->sw_major_rev, hw_info->sw_minor_rev); for (i = 0; i < serial->num_ports; i++) { - port = &serial->port[i]; + port = serial->port[i]; info = (struct whiteheat_private *)kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); if (info == NULL) { @@ -496,7 +496,7 @@ no_command_private: for (i = serial->num_ports - 1; i >= 0; i--) { - port = &serial->port[i]; + port = serial->port[i]; info = usb_get_serial_port_data(port); for (j = urb_pool_size - 1; j >= 0; j--) { tmp = list_first(&info->tx_urbs_free); @@ -543,11 +543,11 @@ dbg("%s", __FUNCTION__); /* free up our private data for our command port */ - command_port = &serial->port[COMMAND_PORT]; + command_port = serial->port[COMMAND_PORT]; kfree (usb_get_serial_port_data(command_port)); for (i = 0; i < serial->num_ports; i++) { - port = &serial->port[i]; + port = serial->port[i]; info = usb_get_serial_port_data(port); list_for_each_safe(tmp, tmp2, &info->rx_urbs_free) { list_del(tmp); @@ -1119,7 +1119,7 @@ dbg("%s - command %d", __FUNCTION__, command); - command_port = &port->serial->port[COMMAND_PORT]; + command_port = port->serial->port[COMMAND_PORT]; command_info = usb_get_serial_port_data(command_port); spin_lock_irqsave(&command_info->lock, flags); command_info->command_finished = FALSE; @@ -1323,7 +1323,7 @@ unsigned long flags; int retval = 0; - command_port = &serial->port[COMMAND_PORT]; + command_port = serial->port[COMMAND_PORT]; command_info = usb_get_serial_port_data(command_port); spin_lock_irqsave(&command_info->lock, flags); if (!command_info->port_running) { @@ -1351,7 +1351,7 @@ struct whiteheat_command_private *command_info; unsigned long flags; - command_port = &serial->port[COMMAND_PORT]; + command_port = serial->port[COMMAND_PORT]; command_info = usb_get_serial_port_data(command_port); spin_lock_irqsave(&command_info->lock, flags); command_info->port_running--;