aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/io_ti.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/io_ti.c')
-rw-r--r--drivers/usb/serial/io_ti.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 0aac00afb5c8..e44d375edaad 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -15,13 +15,6 @@
15 * For questions or problems with this driver, contact Inside Out 15 * For questions or problems with this driver, contact Inside Out
16 * Networks technical support, or Peter Berger <pberger@brimson.com>, 16 * Networks technical support, or Peter Berger <pberger@brimson.com>,
17 * or Al Borchers <alborchers@steinerpoint.com>. 17 * or Al Borchers <alborchers@steinerpoint.com>.
18 *
19 * Version history:
20 *
21 * July 11, 2002 Removed 4 port device structure since all TI UMP
22 * chips have only 2 ports
23 * David Iacovelli (davidi@ionetworks.com)
24 *
25 */ 18 */
26 19
27#include <linux/kernel.h> 20#include <linux/kernel.h>
@@ -1777,12 +1770,11 @@ static void edge_bulk_in_callback(struct urb *urb)
1777exit: 1770exit:
1778 /* continue read unless stopped */ 1771 /* continue read unless stopped */
1779 spin_lock(&edge_port->ep_lock); 1772 spin_lock(&edge_port->ep_lock);
1780 if (edge_port->ep_read_urb_state == EDGE_READ_URB_RUNNING) { 1773 if (edge_port->ep_read_urb_state == EDGE_READ_URB_RUNNING)
1781 urb->dev = edge_port->port->serial->dev;
1782 retval = usb_submit_urb(urb, GFP_ATOMIC); 1774 retval = usb_submit_urb(urb, GFP_ATOMIC);
1783 } else if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPING) { 1775 else if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPING)
1784 edge_port->ep_read_urb_state = EDGE_READ_URB_STOPPED; 1776 edge_port->ep_read_urb_state = EDGE_READ_URB_STOPPED;
1785 } 1777
1786 spin_unlock(&edge_port->ep_lock); 1778 spin_unlock(&edge_port->ep_lock);
1787 if (retval) 1779 if (retval)
1788 dev_err(&urb->dev->dev, 1780 dev_err(&urb->dev->dev,
@@ -1959,9 +1951,7 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
1959 status = -EINVAL; 1951 status = -EINVAL;
1960 goto release_es_lock; 1952 goto release_es_lock;
1961 } 1953 }
1962 urb->complete = edge_interrupt_callback;
1963 urb->context = edge_serial; 1954 urb->context = edge_serial;
1964 urb->dev = dev;
1965 status = usb_submit_urb(urb, GFP_KERNEL); 1955 status = usb_submit_urb(urb, GFP_KERNEL);
1966 if (status) { 1956 if (status) {
1967 dev_err(&port->dev, 1957 dev_err(&port->dev,
@@ -1987,9 +1977,7 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
1987 goto unlink_int_urb; 1977 goto unlink_int_urb;
1988 } 1978 }
1989 edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING; 1979 edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
1990 urb->complete = edge_bulk_in_callback;
1991 urb->context = edge_port; 1980 urb->context = edge_port;
1992 urb->dev = dev;
1993 status = usb_submit_urb(urb, GFP_KERNEL); 1981 status = usb_submit_urb(urb, GFP_KERNEL);
1994 if (status) { 1982 if (status) {
1995 dev_err(&port->dev, 1983 dev_err(&port->dev,
@@ -2118,12 +2106,7 @@ static void edge_send(struct tty_struct *tty)
2118 port->write_urb->transfer_buffer); 2106 port->write_urb->transfer_buffer);
2119 2107
2120 /* set up our urb */ 2108 /* set up our urb */
2121 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 2109 port->write_urb->transfer_buffer_length = count;
2122 usb_sndbulkpipe(port->serial->dev,
2123 port->bulk_out_endpointAddress),
2124 port->write_urb->transfer_buffer, count,
2125 edge_bulk_out_callback,
2126 port);
2127 2110
2128 /* send the data out the bulk port */ 2111 /* send the data out the bulk port */
2129 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 2112 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
@@ -2267,9 +2250,6 @@ static int restart_read(struct edgeport_port *edge_port)
2267 2250
2268 if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPED) { 2251 if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPED) {
2269 urb = edge_port->port->read_urb; 2252 urb = edge_port->port->read_urb;
2270 urb->complete = edge_bulk_in_callback;
2271 urb->context = edge_port;
2272 urb->dev = edge_port->port->serial->dev;
2273 status = usb_submit_urb(urb, GFP_ATOMIC); 2253 status = usb_submit_urb(urb, GFP_ATOMIC);
2274 } 2254 }
2275 edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING; 2255 edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;