mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
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>
This commit is contained in:
parent
e96da398ce
commit
8110598484
1 changed files with 15 additions and 12 deletions
|
@ -103,6 +103,7 @@ static void mos7720_interrupt_callback(struct urb *urb)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
int length;
|
int length;
|
||||||
|
int status = urb->status;
|
||||||
__u8 *data;
|
__u8 *data;
|
||||||
__u8 sp1;
|
__u8 sp1;
|
||||||
__u8 sp2;
|
__u8 sp2;
|
||||||
|
@ -114,7 +115,7 @@ static void mos7720_interrupt_callback(struct urb *urb)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (urb->status) {
|
switch (status) {
|
||||||
case 0:
|
case 0:
|
||||||
/* success */
|
/* success */
|
||||||
break;
|
break;
|
||||||
|
@ -123,11 +124,11 @@ static void mos7720_interrupt_callback(struct urb *urb)
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
/* this urb is terminated, clean up */
|
/* this urb is terminated, clean up */
|
||||||
dbg("%s - urb shutting down with status: %d", __FUNCTION__,
|
dbg("%s - urb shutting down with status: %d", __FUNCTION__,
|
||||||
urb->status);
|
status);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
dbg("%s - nonzero urb status received: %d", __FUNCTION__,
|
dbg("%s - nonzero urb status received: %d", __FUNCTION__,
|
||||||
urb->status);
|
status);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,14 +199,15 @@ static void mos7720_interrupt_callback(struct urb *urb)
|
||||||
*/
|
*/
|
||||||
static void mos7720_bulk_in_callback(struct urb *urb)
|
static void mos7720_bulk_in_callback(struct urb *urb)
|
||||||
{
|
{
|
||||||
int status;
|
int retval;
|
||||||
unsigned char *data ;
|
unsigned char *data ;
|
||||||
struct usb_serial_port *port;
|
struct usb_serial_port *port;
|
||||||
struct moschip_port *mos7720_port;
|
struct moschip_port *mos7720_port;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
|
int status = urb->status;
|
||||||
|
|
||||||
if (urb->status) {
|
if (status) {
|
||||||
dbg("nonzero read bulk status received: %d",urb->status);
|
dbg("nonzero read bulk status received: %d", status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,10 +238,10 @@ static void mos7720_bulk_in_callback(struct urb *urb)
|
||||||
if (port->read_urb->status != -EINPROGRESS) {
|
if (port->read_urb->status != -EINPROGRESS) {
|
||||||
port->read_urb->dev = port->serial->dev;
|
port->read_urb->dev = port->serial->dev;
|
||||||
|
|
||||||
status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
|
retval = usb_submit_urb(port->read_urb, GFP_ATOMIC);
|
||||||
if (status)
|
if (retval)
|
||||||
dbg("usb_submit_urb(read bulk) failed, status = %d",
|
dbg("usb_submit_urb(read bulk) failed, retval = %d",
|
||||||
status);
|
retval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,9 +254,10 @@ static void mos7720_bulk_out_data_callback(struct urb *urb)
|
||||||
{
|
{
|
||||||
struct moschip_port *mos7720_port;
|
struct moschip_port *mos7720_port;
|
||||||
struct tty_struct *tty;
|
struct tty_struct *tty;
|
||||||
|
int status = urb->status;
|
||||||
|
|
||||||
if (urb->status) {
|
if (status) {
|
||||||
dbg("nonzero write bulk status received:%d", urb->status);
|
dbg("nonzero write bulk status received:%d", status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue