aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7720.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/mos7720.c')
-rw-r--r--drivers/usb/serial/mos7720.c43
1 files changed, 18 insertions, 25 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index b563e2ad8728..231b584f6d0f 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -9,9 +9,9 @@
9 * the Free Software Foundation, version 2 of the License. 9 * the Free Software Foundation, version 2 of the License.
10 * 10 *
11 * Developed by: 11 * Developed by:
12 * VijayaKumar.G.N. <vijaykumar@aspirecom.net> 12 * Vijaya Kumar <vijaykumar.gn@gmail.com>
13 * AjayKumar <ajay@aspirecom.net> 13 * Ajay Kumar <naanuajay@yahoo.com>
14 * Gurudeva.N. <gurudev@aspirecom.net> 14 * Gurudeva <ngurudeva@yahoo.com>
15 * 15 *
16 * Cleaned up from the original by: 16 * Cleaned up from the original by:
17 * Greg Kroah-Hartman <gregkh@suse.de> 17 * Greg Kroah-Hartman <gregkh@suse.de>
@@ -103,6 +103,7 @@ static void mos7720_interrupt_callback(struct urb *urb)
103{ 103{
104 int result; 104 int result;
105 int length; 105 int length;
106 int status = urb->status;
106 __u8 *data; 107 __u8 *data;
107 __u8 sp1; 108 __u8 sp1;
108 __u8 sp2; 109 __u8 sp2;
@@ -114,7 +115,7 @@ static void mos7720_interrupt_callback(struct urb *urb)
114 return; 115 return;
115 } 116 }
116 117
117 switch (urb->status) { 118 switch (status) {
118 case 0: 119 case 0:
119 /* success */ 120 /* success */
120 break; 121 break;
@@ -123,11 +124,11 @@ static void mos7720_interrupt_callback(struct urb *urb)
123 case -ESHUTDOWN: 124 case -ESHUTDOWN:
124 /* this urb is terminated, clean up */ 125 /* this urb is terminated, clean up */
125 dbg("%s - urb shutting down with status: %d", __FUNCTION__, 126 dbg("%s - urb shutting down with status: %d", __FUNCTION__,
126 urb->status); 127 status);
127 return; 128 return;
128 default: 129 default:
129 dbg("%s - nonzero urb status received: %d", __FUNCTION__, 130 dbg("%s - nonzero urb status received: %d", __FUNCTION__,
130 urb->status); 131 status);
131 goto exit; 132 goto exit;
132 } 133 }
133 134
@@ -198,14 +199,15 @@ exit:
198 */ 199 */
199static void mos7720_bulk_in_callback(struct urb *urb) 200static void mos7720_bulk_in_callback(struct urb *urb)
200{ 201{
201 int status; 202 int retval;
202 unsigned char *data ; 203 unsigned char *data ;
203 struct usb_serial_port *port; 204 struct usb_serial_port *port;
204 struct moschip_port *mos7720_port; 205 struct moschip_port *mos7720_port;
205 struct tty_struct *tty; 206 struct tty_struct *tty;
207 int status = urb->status;
206 208
207 if (urb->status) { 209 if (status) {
208 dbg("nonzero read bulk status received: %d",urb->status); 210 dbg("nonzero read bulk status received: %d", status);
209 return; 211 return;
210 } 212 }
211 213
@@ -236,10 +238,10 @@ static void mos7720_bulk_in_callback(struct urb *urb)
236 if (port->read_urb->status != -EINPROGRESS) { 238 if (port->read_urb->status != -EINPROGRESS) {
237 port->read_urb->dev = port->serial->dev; 239 port->read_urb->dev = port->serial->dev;
238 240
239 status = usb_submit_urb(port->read_urb, GFP_ATOMIC); 241 retval = usb_submit_urb(port->read_urb, GFP_ATOMIC);
240 if (status) 242 if (retval)
241 dbg("usb_submit_urb(read bulk) failed, status = %d", 243 dbg("usb_submit_urb(read bulk) failed, retval = %d",
242 status); 244 retval);
243 } 245 }
244} 246}
245 247
@@ -252,9 +254,10 @@ static void mos7720_bulk_out_data_callback(struct urb *urb)
252{ 254{
253 struct moschip_port *mos7720_port; 255 struct moschip_port *mos7720_port;
254 struct tty_struct *tty; 256 struct tty_struct *tty;
257 int status = urb->status;
255 258
256 if (urb->status) { 259 if (status) {
257 dbg("nonzero write bulk status received:%d", urb->status); 260 dbg("nonzero write bulk status received:%d", status);
258 return; 261 return;
259 } 262 }
260 263
@@ -1235,16 +1238,6 @@ static void mos7720_set_termios(struct usb_serial_port *port,
1235 return; 1238 return;
1236 } 1239 }
1237 1240
1238 /* check that they really want us to change something */
1239 if (old_termios) {
1240 if ((cflag == old_termios->c_cflag) &&
1241 (RELEVANT_IFLAG(tty->termios->c_iflag) ==
1242 RELEVANT_IFLAG(old_termios->c_iflag))) {
1243 dbg("Nothing to change");
1244 return;
1245 }
1246 }
1247
1248 dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 1241 dbg("%s - clfag %08x iflag %08x", __FUNCTION__,
1249 tty->termios->c_cflag, 1242 tty->termios->c_cflag,
1250 RELEVANT_IFLAG(tty->termios->c_iflag)); 1243 RELEVANT_IFLAG(tty->termios->c_iflag));