aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-05-13 15:33:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:46 -0400
commit605204bfb0047523b3acda535163875a75268a6a (patch)
treec3f9f404815879dfaa20157dbdf01b1fd717edc3 /drivers/usb
parentf4a4cbb2047ec6b0175a08e5bcd78a697773390d (diff)
USB: ipw: clean up dtr-rts handling
No need to raise dtr/rts in open as this is taken care of by tty layer. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/ipw.c43
1 files changed, 6 insertions, 37 deletions
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c
index e1d07840cee6..18b335e0959c 100644
--- a/drivers/usb/serial/ipw.c
+++ b/drivers/usb/serial/ipw.c
@@ -267,35 +267,6 @@ static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port)
267 dev_err(&port->dev, 267 dev_err(&port->dev,
268 "initial flowcontrol failed (error = %d)\n", result); 268 "initial flowcontrol failed (error = %d)\n", result);
269 269
270
271 /*--5: raise the dtr */
272 dbg("%s:raising dtr", __func__);
273 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
274 IPW_SIO_SET_PIN,
275 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
276 IPW_PIN_SETDTR,
277 0,
278 NULL,
279 0,
280 200000);
281 if (result < 0)
282 dev_err(&port->dev,
283 "setting dtr failed (error = %d)\n", result);
284
285 /*--6: raise the rts */
286 dbg("%s:raising rts", __func__);
287 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
288 IPW_SIO_SET_PIN,
289 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
290 IPW_PIN_SETRTS,
291 0,
292 NULL,
293 0,
294 200000);
295 if (result < 0)
296 dev_err(&port->dev,
297 "setting dtr failed (error = %d)\n", result);
298
299 kfree(buf_flow_init); 270 kfree(buf_flow_init);
300 return 0; 271 return 0;
301} 272}
@@ -305,8 +276,8 @@ static void ipw_dtr_rts(struct usb_serial_port *port, int on)
305 struct usb_device *dev = port->serial->dev; 276 struct usb_device *dev = port->serial->dev;
306 int result; 277 int result;
307 278
308 /*--1: drop the dtr */ 279 dbg("%s: on = %d", __func__, on);
309 dbg("%s:dropping dtr", __func__); 280
310 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 281 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
311 IPW_SIO_SET_PIN, 282 IPW_SIO_SET_PIN,
312 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 283 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
@@ -316,22 +287,20 @@ static void ipw_dtr_rts(struct usb_serial_port *port, int on)
316 0, 287 0,
317 200000); 288 200000);
318 if (result < 0) 289 if (result < 0)
319 dev_err(&port->dev, "dropping dtr failed (error = %d)\n", 290 dev_err(&port->dev, "setting dtr failed (error = %d)\n",
320 result); 291 result);
321 292
322 /*--2: drop the rts */
323 dbg("%s:dropping rts", __func__);
324 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 293 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
325 IPW_SIO_SET_PIN, USB_TYPE_VENDOR | 294 IPW_SIO_SET_PIN, USB_TYPE_VENDOR |
326 USB_RECIP_INTERFACE | USB_DIR_OUT, 295 USB_RECIP_INTERFACE | USB_DIR_OUT,
327 on ? IPW_PIN_SETRTS : IPW_PIN_CLRRTS, 296 on ? IPW_PIN_SETRTS : IPW_PIN_CLRRTS,
328 0, 297 0,
329 NULL, 298 NULL,
330 0, 299 0,
331 200000); 300 200000);
332 if (result < 0) 301 if (result < 0)
333 dev_err(&port->dev, 302 dev_err(&port->dev, "setting rts failed (error = %d)\n",
334 "dropping rts failed (error = %d)\n", result); 303 result);
335} 304}
336 305
337static void ipw_close(struct usb_serial_port *port) 306static void ipw_close(struct usb_serial_port *port)