[PATCH 08/11] NFC: pn533: reduce output when stopping poll

From: Michael Thalmeier
Date: Thu Apr 21 2016 - 10:46:49 EST


Handle return codes for stopped polling operations better to reduce logging
activity.

Signed-off-by: Michael Thalmeier <michael.thalmeier@xxxxxxx>
---
drivers/nfc/pn533/pn533.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c
index d1cc70a..c06d22f 100644
--- a/drivers/nfc/pn533/pn533.c
+++ b/drivers/nfc/pn533/pn533.c
@@ -1259,7 +1259,8 @@ static int pn533_rf_complete(struct pn533 *dev, void *arg,
if (IS_ERR(resp)) {
rc = PTR_ERR(resp);

- nfc_err(dev->dev, "RF setting error %d\n", rc);
+ if (rc != -ENOENT)
+ nfc_err(dev->dev, "RF setting error %d\n", rc);

return rc;
}
@@ -1416,9 +1417,6 @@ static int pn533_poll_complete(struct pn533 *dev, void *arg,
if (IS_ERR(resp)) {
rc = PTR_ERR(resp);

- nfc_err(dev->dev, "%s Poll complete error %d\n",
- __func__, rc);
-
if (rc == -ENOENT) {
if (dev->poll_mod_count != 0)
return rc;
@@ -1457,7 +1455,7 @@ done:
return rc;

stop_poll:
- nfc_err(dev->dev, "Polling operation has been stopped\n");
+ dev_dbg(dev->dev, "Polling operation has been stopped\n");

pn533_poll_reset_mod_list(dev);
dev->poll_protocols = 0;
--
2.5.5