staging: ft1000: Fix coding style in ft1000_submit_rx_urb function.
Fix coding style and also replace printk with proper pr_err function. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e31e33855a
commit
6b2a66f250
1 changed files with 22 additions and 24 deletions
|
@ -1203,38 +1203,36 @@ static int ft1000_copy_up_pkt (struct urb *urb)
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
static int ft1000_submit_rx_urb(struct ft1000_info *info)
|
static int ft1000_submit_rx_urb(struct ft1000_info *info)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
struct ft1000_device *pFt1000Dev = info->pFt1000Dev;
|
struct ft1000_device *pFt1000Dev = info->pFt1000Dev;
|
||||||
|
|
||||||
|
//DEBUG ("ft1000_submit_rx_urb entered: sizeof rx_urb is %d\n", sizeof(*pFt1000Dev->rx_urb));
|
||||||
|
if (pFt1000Dev->status & FT1000_STATUS_CLOSING) {
|
||||||
|
DEBUG("network driver is closed, return\n");
|
||||||
|
//usb_kill_urb(pFt1000Dev->rx_urb); //mbelian
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
//DEBUG ("ft1000_submit_rx_urb entered: sizeof rx_urb is %d\n", sizeof(*pFt1000Dev->rx_urb));
|
usb_fill_bulk_urb(pFt1000Dev->rx_urb,
|
||||||
if ( pFt1000Dev->status & FT1000_STATUS_CLOSING)
|
pFt1000Dev->dev,
|
||||||
{
|
usb_rcvbulkpipe(pFt1000Dev->dev,
|
||||||
DEBUG("network driver is closed, return\n");
|
pFt1000Dev->bulk_in_endpointAddr),
|
||||||
//usb_kill_urb(pFt1000Dev->rx_urb); //mbelian
|
pFt1000Dev->rx_buf, MAX_BUF_SIZE,
|
||||||
return -ENODEV;
|
(usb_complete_t) ft1000_copy_up_pkt, info);
|
||||||
}
|
|
||||||
|
|
||||||
usb_fill_bulk_urb(pFt1000Dev->rx_urb,
|
result = usb_submit_urb(pFt1000Dev->rx_urb, GFP_ATOMIC);
|
||||||
pFt1000Dev->dev,
|
|
||||||
usb_rcvbulkpipe(pFt1000Dev->dev, pFt1000Dev->bulk_in_endpointAddr),
|
|
||||||
pFt1000Dev->rx_buf,
|
|
||||||
MAX_BUF_SIZE,
|
|
||||||
(usb_complete_t)ft1000_copy_up_pkt,
|
|
||||||
info);
|
|
||||||
|
|
||||||
|
if (result) {
|
||||||
if((result = usb_submit_urb(pFt1000Dev->rx_urb, GFP_ATOMIC)))
|
pr_err("ft1000_submit_rx_urb: submitting rx_urb %d failed\n",
|
||||||
{
|
result);
|
||||||
printk("ft1000_submit_rx_urb: submitting rx_urb %d failed\n", result);
|
return result;
|
||||||
return result;
|
}
|
||||||
}
|
//DEBUG("ft1000_submit_rx_urb exit: result=%d\n", result);
|
||||||
|
|
||||||
//DEBUG("ft1000_submit_rx_urb exit: result=%d\n", result);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Function: ft1000_open
|
// Function: ft1000_open
|
||||||
//
|
//
|
||||||
|
|
Reference in a new issue