diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-06-15 18:44:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:34:35 -0400 |
commit | 81105984848481d8876e454e3c503dbd0e8e4dce (patch) | |
tree | 31933193a35c297cedbd5011442521924f2b5f8e /drivers/usb | |
parent | e96da398ce32c0e2af5eee772feb112323f027b4 (diff) |
USB: serial: mos7720: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.
Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: VijayaKumar G.N. <vijaykumar@aspirecom.net>
Cc: AjayKumar <ajay@aspirecom.net>
Cc: Gurudeva N. <gurudev@aspirecom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/mos7720.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index b563e2ad8728..5a4c33c492d2 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -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 | */ |
199 | static void mos7720_bulk_in_callback(struct urb *urb) | 200 | static 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 | ||