diff options
Diffstat (limited to 'drivers/usb/serial/ipw.c')
-rw-r--r-- | drivers/usb/serial/ipw.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index da2a2b46644a..29ad038b9c8d 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c | |||
@@ -302,23 +302,17 @@ static int ipw_open(struct tty_struct *tty, | |||
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | 304 | ||
305 | static void ipw_close(struct tty_struct *tty, | 305 | static void ipw_dtr_rts(struct usb_serial_port *port, int on) |
306 | struct usb_serial_port *port, struct file *filp) | ||
307 | { | 306 | { |
308 | struct usb_device *dev = port->serial->dev; | 307 | struct usb_device *dev = port->serial->dev; |
309 | int result; | 308 | int result; |
310 | 309 | ||
311 | if (tty_hung_up_p(filp)) { | ||
312 | dbg("%s: tty_hung_up_p ...", __func__); | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | /*--1: drop the dtr */ | 310 | /*--1: drop the dtr */ |
317 | dbg("%s:dropping dtr", __func__); | 311 | dbg("%s:dropping dtr", __func__); |
318 | result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), | 312 | result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), |
319 | IPW_SIO_SET_PIN, | 313 | IPW_SIO_SET_PIN, |
320 | USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, | 314 | USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, |
321 | IPW_PIN_CLRDTR, | 315 | on ? IPW_PIN_SETDTR : IPW_PIN_CLRDTR, |
322 | 0, | 316 | 0, |
323 | NULL, | 317 | NULL, |
324 | 0, | 318 | 0, |
@@ -332,7 +326,7 @@ static void ipw_close(struct tty_struct *tty, | |||
332 | result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), | 326 | result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), |
333 | IPW_SIO_SET_PIN, USB_TYPE_VENDOR | | 327 | IPW_SIO_SET_PIN, USB_TYPE_VENDOR | |
334 | USB_RECIP_INTERFACE | USB_DIR_OUT, | 328 | USB_RECIP_INTERFACE | USB_DIR_OUT, |
335 | IPW_PIN_CLRRTS, | 329 | on ? IPW_PIN_SETRTS : IPW_PIN_CLRRTS, |
336 | 0, | 330 | 0, |
337 | NULL, | 331 | NULL, |
338 | 0, | 332 | 0, |
@@ -340,7 +334,12 @@ static void ipw_close(struct tty_struct *tty, | |||
340 | if (result < 0) | 334 | if (result < 0) |
341 | dev_err(&port->dev, | 335 | dev_err(&port->dev, |
342 | "dropping rts failed (error = %d)\n", result); | 336 | "dropping rts failed (error = %d)\n", result); |
337 | } | ||
343 | 338 | ||
339 | static void ipw_close(struct usb_serial_port *port) | ||
340 | { | ||
341 | struct usb_device *dev = port->serial->dev; | ||
342 | int result; | ||
344 | 343 | ||
345 | /*--3: purge */ | 344 | /*--3: purge */ |
346 | dbg("%s:sending purge", __func__); | 345 | dbg("%s:sending purge", __func__); |
@@ -461,6 +460,7 @@ static struct usb_serial_driver ipw_device = { | |||
461 | .num_ports = 1, | 460 | .num_ports = 1, |
462 | .open = ipw_open, | 461 | .open = ipw_open, |
463 | .close = ipw_close, | 462 | .close = ipw_close, |
463 | .dtr_rts = ipw_dtr_rts, | ||
464 | .port_probe = ipw_probe, | 464 | .port_probe = ipw_probe, |
465 | .port_remove = ipw_disconnect, | 465 | .port_remove = ipw_disconnect, |
466 | .write = ipw_write, | 466 | .write = ipw_write, |