[PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err

From: Iker Pedrosa
Date: Mon Sep 16 2013 - 09:44:43 EST


The previously used printk lacked the warning level, now we've got a more accurate way to know the error.

Signed-off-by: Iker Pedrosa <ikerpedrosam@xxxxxxxxx>
---
drivers/staging/winbond/wb35tx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
index 8c25cbd..18b28f2 100644
--- a/drivers/staging/winbond/wb35tx.c
+++ b/drivers/staging/winbond/wb35tx.c
@@ -32,7 +32,7 @@ static void Wb35Tx_complete(struct urb *pUrb)
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
struct wb35_mds *pMds = &adapter->Mds;

- printk("wb35: tx complete\n");
+ netdev_err(pUrb->dev, "wb35: tx complete\n");
/* Variable setting */
pWb35Tx->EP4vm_state = VM_COMPLETED;
pWb35Tx->EP4VM_status = pUrb->status; /* Store the last result of Irp */
@@ -49,7 +49,7 @@ static void Wb35Tx_complete(struct urb *pUrb)

/* The URB is completed, check the result */
if (pWb35Tx->EP4VM_status != 0) {
- printk("URB submission failed\n");
+ netdev_err(pUrb->dev, "URB submission failed\n");
pWb35Tx->EP4vm_state = VM_STOP;
goto error;
}
@@ -96,7 +96,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter)
pWb35Tx->EP4vm_state = VM_RUNNING;
retv = usb_submit_urb(pUrb, GFP_ATOMIC);
if (retv < 0) {
- printk("EP4 Tx Irp sending error\n");
+ netdev_err(pUrb->dev, "EP4 Tx Irp sending error\n");
goto cleanup;
}

@@ -218,7 +218,7 @@ static void Wb35Tx_EP2VM_complete(struct urb *pUrb)

/* The Urb is completed, check the result */
if (pWb35Tx->EP2VM_status != 0) {
- printk("EP2 IoCompleteRoutine return error\n");
+ netdev_err(pUrb->dev, "EP2 IoCompleteRoutine return error\n");
pWb35Tx->EP2vm_state = VM_STOP;
goto error;
}
--
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/