diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2010-08-05 17:01:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-23 23:50:15 -0400 |
commit | 556f1a0e9c178193e584209b47cf1cb9f669bd51 (patch) | |
tree | 7df2db7a1a0f40c2894d65520dededd8b094f863 /drivers/usb/serial | |
parent | 79f203a26a07a9d5701c404925e85eb161b72cde (diff) |
USB: ssu100: add register parameter to ssu100_setregister
The function ssu100_setregister was hard coded to only set the MCR
register. Add a register parameter so that other registers can be
set.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/ssu100.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 3c586b5790e1..ad5f9ae40687 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c | |||
@@ -127,9 +127,10 @@ static inline int ssu100_getregister(struct usb_device *dev, | |||
127 | 127 | ||
128 | static inline int ssu100_setregister(struct usb_device *dev, | 128 | static inline int ssu100_setregister(struct usb_device *dev, |
129 | unsigned short uart, | 129 | unsigned short uart, |
130 | unsigned short reg, | ||
130 | u16 data) | 131 | u16 data) |
131 | { | 132 | { |
132 | u16 value = (data << 8) | UART_MCR; | 133 | u16 value = (data << 8) | reg; |
133 | 134 | ||
134 | return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), | 135 | return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), |
135 | QT_SET_GET_REGISTER, 0x40, value, uart, | 136 | QT_SET_GET_REGISTER, 0x40, value, uart, |
@@ -159,7 +160,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set, | |||
159 | if (set & TIOCM_RTS) | 160 | if (set & TIOCM_RTS) |
160 | urb_value |= UART_MCR_RTS; | 161 | urb_value |= UART_MCR_RTS; |
161 | 162 | ||
162 | result = ssu100_setregister(dev, 0, urb_value); | 163 | result = ssu100_setregister(dev, 0, UART_MCR, urb_value); |
163 | if (result < 0) | 164 | if (result < 0) |
164 | dbg("%s Error from MODEM_CTRL urb", __func__); | 165 | dbg("%s Error from MODEM_CTRL urb", __func__); |
165 | 166 | ||
@@ -529,7 +530,7 @@ static void ssu100_dtr_rts(struct usb_serial_port *port, int on) | |||
529 | if (!port->serial->disconnected) { | 530 | if (!port->serial->disconnected) { |
530 | /* Disable flow control */ | 531 | /* Disable flow control */ |
531 | if (!on && | 532 | if (!on && |
532 | ssu100_setregister(dev, 0, 0) < 0) | 533 | ssu100_setregister(dev, 0, UART_MCR, 0) < 0) |
533 | dev_err(&port->dev, "error from flowcontrol urb\n"); | 534 | dev_err(&port->dev, "error from flowcontrol urb\n"); |
534 | /* drop RTS and DTR */ | 535 | /* drop RTS and DTR */ |
535 | if (on) | 536 | if (on) |