Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754038Ab1CHLdS (ORCPT ); Tue, 8 Mar 2011 06:33:18 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:57139 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414Ab1CHLdR (ORCPT ); Tue, 8 Mar 2011 06:33:17 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=dBky7+Ehr0g59Hm+56Ik5mqcjgz+tvlJZwz2eHafQTcVs7v91Z2zyF689aeWJawtK1 3RT/bX7OeqNA5oiEak2OrO246Y09UG8iDhDk2mQrkxaUTK7cTtXta6qlfSSzxjl7LCrI azU32ZOljbZjujqD/VHpvz/xNXakHWInayQS0= From: Marek Belisko To: gregkh@suse.de Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Marek Belisko Subject: [PATCH 14/21 v2] staging: ft1000: Fix coding style in ft1000_submit_rx_urb function. Date: Tue, 8 Mar 2011 12:33:06 +0100 Message-Id: <1299583986-2719-1-git-send-email-marek.belisko@open-nandra.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1299486086-7325-15-git-send-email-marek.belisko@open-nandra.com> References: <1299486086-7325-15-git-send-email-marek.belisko@open-nandra.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2832 Lines: 81 Fix coding style and also replace printk with proper pr_err function. Signed-off-by: Marek Belisko --- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 46 ++++++++++++------------- 1 files changed, 22 insertions(+), 24 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c index 8095dd2..8115e2c 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c @@ -1203,38 +1203,36 @@ static int ft1000_copy_up_pkt (struct urb *urb) //--------------------------------------------------------------------------- static int ft1000_submit_rx_urb(struct ft1000_info *info) { - int result; - struct ft1000_device *pFt1000Dev = info->pFt1000Dev; + int result; + 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)); - if ( pFt1000Dev->status & FT1000_STATUS_CLOSING) - { - DEBUG("network driver is closed, return\n"); - //usb_kill_urb(pFt1000Dev->rx_urb); //mbelian - return -ENODEV; - } - - usb_fill_bulk_urb(pFt1000Dev->rx_urb, - pFt1000Dev->dev, - usb_rcvbulkpipe(pFt1000Dev->dev, pFt1000Dev->bulk_in_endpointAddr), - pFt1000Dev->rx_buf, - MAX_BUF_SIZE, - (usb_complete_t)ft1000_copy_up_pkt, - info); - + usb_fill_bulk_urb(pFt1000Dev->rx_urb, + 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 = usb_submit_urb(pFt1000Dev->rx_urb, GFP_ATOMIC))) - { - printk("ft1000_submit_rx_urb: submitting rx_urb %d failed\n", result); - return result; - } + result = usb_submit_urb(pFt1000Dev->rx_urb, GFP_ATOMIC); - //DEBUG("ft1000_submit_rx_urb exit: result=%d\n", result); + if (result) { + pr_err("ft1000_submit_rx_urb: submitting rx_urb %d failed\n", + result); + return result; + } + //DEBUG("ft1000_submit_rx_urb exit: result=%d\n", result); return 0; } + //--------------------------------------------------------------------------- // Function: ft1000_open // -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/