diff options
author | Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> | 2012-12-10 14:42:54 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-10 00:51:41 +0100 |
commit | f8f991710b580878c88cfe49d918cfb0c9e15236 (patch) | |
tree | 1e37131ae101c0117343e79179191205ef7c4901 /drivers/nfc | |
parent | 89fb20256725e735601ea6439680956fa2ec4741 (diff) | |
download | kernel_goldelico_gta04-f8f991710b580878c88cfe49d918cfb0c9e15236.zip kernel_goldelico_gta04-f8f991710b580878c88cfe49d918cfb0c9e15236.tar.gz kernel_goldelico_gta04-f8f991710b580878c88cfe49d918cfb0c9e15236.tar.bz2 |
NFC: pn533: Fix urb->status handling
Fix text message to be more suitable for the error code and treat
ESHUTDOWN as an error not debug msg.
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/pn533.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c index d17ec6a..898375d 100644 --- a/drivers/nfc/pn533.c +++ b/drivers/nfc/pn533.c @@ -505,18 +505,19 @@ static void pn533_recv_response(struct urb *urb) switch (urb->status) { case 0: - /* success */ - break; + break; /* success */ case -ECONNRESET: case -ENOENT: - case -ESHUTDOWN: nfc_dev_dbg(&dev->interface->dev, - "Urb shutting down with status: %d", urb->status); + "The urb has been canceled (status %d)", + urb->status); dev->wq_in_error = urb->status; goto sched_wq; + break; + case -ESHUTDOWN: default: nfc_dev_err(&dev->interface->dev, - "Nonzero urb status received: %d", urb->status); + "Urb failure (status %d)", urb->status); dev->wq_in_error = urb->status; goto sched_wq; } @@ -562,18 +563,19 @@ static void pn533_recv_ack(struct urb *urb) switch (urb->status) { case 0: - /* success */ - break; + break; /* success */ case -ECONNRESET: case -ENOENT: - case -ESHUTDOWN: nfc_dev_dbg(&dev->interface->dev, - "Urb shutting down with status: %d", urb->status); + "The urb has been stopped (status %d)", + urb->status); dev->wq_in_error = urb->status; goto sched_wq; + break; + case -ESHUTDOWN: default: nfc_dev_err(&dev->interface->dev, - "Nonzero urb status received: %d", urb->status); + "Urb failure (status %d)", urb->status); dev->wq_in_error = urb->status; goto sched_wq; } @@ -981,17 +983,17 @@ static void pn533_send_complete(struct urb *urb) switch (urb->status) { case 0: - /* success */ - break; + break; /* success */ case -ECONNRESET: case -ENOENT: - case -ESHUTDOWN: nfc_dev_dbg(&dev->interface->dev, - "Urb shutting down with status: %d", urb->status); + "The urb has been stopped (status %d)", + urb->status); break; + case -ESHUTDOWN: default: - nfc_dev_dbg(&dev->interface->dev, - "Nonzero urb status received: %d", urb->status); + nfc_dev_err(&dev->interface->dev, + "Urb failure (status %d)", urb->status); } } |