aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ipw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/ipw.c')
-rw-r--r--drivers/usb/serial/ipw.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c
index bc85ca5c1c37..a89ebfe9e915 100644
--- a/drivers/usb/serial/ipw.c
+++ b/drivers/usb/serial/ipw.c
@@ -179,7 +179,7 @@ static void ipw_read_bulk_callback(struct urb *urb)
179 179
180 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data); 180 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
181 181
182 tty = port->tty; 182 tty = port->port.tty;
183 if (tty && urb->actual_length) { 183 if (tty && urb->actual_length) {
184 tty_buffer_request_room(tty, urb->actual_length); 184 tty_buffer_request_room(tty, urb->actual_length);
185 tty_insert_flip_string(tty, data, urb->actual_length); 185 tty_insert_flip_string(tty, data, urb->actual_length);
@@ -199,7 +199,8 @@ static void ipw_read_bulk_callback(struct urb *urb)
199 return; 199 return;
200} 200}
201 201
202static int ipw_open(struct usb_serial_port *port, struct file *filp) 202static int ipw_open(struct tty_struct *tty,
203 struct usb_serial_port *port, struct file *filp)
203{ 204{
204 struct usb_device *dev = port->serial->dev; 205 struct usb_device *dev = port->serial->dev;
205 u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT; 206 u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT;
@@ -212,8 +213,8 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
212 if (!buf_flow_init) 213 if (!buf_flow_init)
213 return -ENOMEM; 214 return -ENOMEM;
214 215
215 if (port->tty) 216 if (tty)
216 port->tty->low_latency = 1; 217 tty->low_latency = 1;
217 218
218 /* --1: Tell the modem to initialize (we think) From sniffs this is always the 219 /* --1: Tell the modem to initialize (we think) From sniffs this is always the
219 * first thing that gets sent to the modem during opening of the device */ 220 * first thing that gets sent to the modem during opening of the device */
@@ -301,7 +302,8 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
301 return 0; 302 return 0;
302} 303}
303 304
304static void ipw_close(struct usb_serial_port *port, struct file * filp) 305static void ipw_close(struct tty_struct *tty,
306 struct usb_serial_port *port, struct file * filp)
305{ 307{
306 struct usb_device *dev = port->serial->dev; 308 struct usb_device *dev = port->serial->dev;
307 int result; 309 int result;
@@ -384,7 +386,8 @@ static void ipw_write_bulk_callback(struct urb *urb)
384 usb_serial_port_softint(port); 386 usb_serial_port_softint(port);
385} 387}
386 388
387static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int count) 389static int ipw_write(struct tty_struct *tty, struct usb_serial_port *port,
390 const unsigned char *buf, int count)
388{ 391{
389 struct usb_device *dev = port->serial->dev; 392 struct usb_device *dev = port->serial->dev;
390 int ret; 393 int ret;