nfc: Convert nfc_dbg to pr_debug
[firefly-linux-kernel-4.4.55.git] / net / nfc / core.c
index 47e02c1b8c02eea81a67f4432e6d45311ba6bd73..c922adb9e651cd35e468b50611f9fd6d5169bf08 100644 (file)
@@ -21,6 +21,8 @@
  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -63,7 +65,7 @@ int nfc_dev_up(struct nfc_dev *dev)
 {
        int rc = 0;
 
-       nfc_dbg("dev_name=%s", dev_name(&dev->dev));
+       pr_debug("dev_name=%s\n", dev_name(&dev->dev));
 
        device_lock(&dev->dev);
 
@@ -97,7 +99,7 @@ int nfc_dev_down(struct nfc_dev *dev)
 {
        int rc = 0;
 
-       nfc_dbg("dev_name=%s", dev_name(&dev->dev));
+       pr_debug("dev_name=%s\n", dev_name(&dev->dev));
 
        device_lock(&dev->dev);
 
@@ -139,7 +141,8 @@ int nfc_start_poll(struct nfc_dev *dev, u32 protocols)
 {
        int rc;
 
-       nfc_dbg("dev_name=%s protocols=0x%x", dev_name(&dev->dev), protocols);
+       pr_debug("dev_name=%s protocols=0x%x\n",
+                dev_name(&dev->dev), protocols);
 
        if (!protocols)
                return -EINVAL;
@@ -174,7 +177,7 @@ int nfc_stop_poll(struct nfc_dev *dev)
 {
        int rc = 0;
 
-       nfc_dbg("dev_name=%s", dev_name(&dev->dev));
+       pr_debug("dev_name=%s\n", dev_name(&dev->dev));
 
        device_lock(&dev->dev);
 
@@ -207,8 +210,8 @@ int nfc_activate_target(struct nfc_dev *dev, u32 target_idx, u32 protocol)
 {
        int rc;
 
-       nfc_dbg("dev_name=%s target_idx=%u protocol=%u", dev_name(&dev->dev),
-                                                       target_idx, protocol);
+       pr_debug("dev_name=%s target_idx=%u protocol=%u\n",
+                dev_name(&dev->dev), target_idx, protocol);
 
        device_lock(&dev->dev);
 
@@ -236,7 +239,8 @@ int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx)
 {
        int rc = 0;
 
-       nfc_dbg("dev_name=%s target_idx=%u", dev_name(&dev->dev), target_idx);
+       pr_debug("dev_name=%s target_idx=%u\n",
+                dev_name(&dev->dev), target_idx);
 
        device_lock(&dev->dev);
 
@@ -271,8 +275,8 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx,
 {
        int rc;
 
-       nfc_dbg("dev_name=%s target_idx=%u skb->len=%u", dev_name(&dev->dev),
-                                                       target_idx, skb->len);
+       pr_debug("dev_name=%s target_idx=%u skb->len=%u\n",
+                dev_name(&dev->dev), target_idx, skb->len);
 
        device_lock(&dev->dev);
 
@@ -326,7 +330,7 @@ int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets,
 {
        int i;
 
-       nfc_dbg("dev_name=%s n_targets=%d", dev_name(&dev->dev), n_targets);
+       pr_debug("dev_name=%s n_targets=%d\n", dev_name(&dev->dev), n_targets);
 
        dev->polling = false;
 
@@ -360,7 +364,7 @@ static void nfc_release(struct device *d)
 {
        struct nfc_dev *dev = to_nfc_dev(d);
 
-       nfc_dbg("dev_name=%s", dev_name(&dev->dev));
+       pr_debug("dev_name=%s\n", dev_name(&dev->dev));
 
        nfc_genl_data_exit(&dev->genl_data);
        kfree(dev->targets);
@@ -446,7 +450,7 @@ int nfc_register_device(struct nfc_dev *dev)
 {
        int rc;
 
-       nfc_dbg("dev_name=%s", dev_name(&dev->dev));
+       pr_debug("dev_name=%s\n", dev_name(&dev->dev));
 
        mutex_lock(&nfc_devlist_mutex);
        nfc_devlist_generation++;
@@ -458,9 +462,8 @@ int nfc_register_device(struct nfc_dev *dev)
 
        rc = nfc_genl_device_added(dev);
        if (rc)
-               nfc_dbg("The userspace won't be notified that the device %s was"
-                                               " added", dev_name(&dev->dev));
-
+               pr_debug("The userspace won't be notified that the device %s was added\n",
+                        dev_name(&dev->dev));
 
        return 0;
 }
@@ -475,7 +478,7 @@ void nfc_unregister_device(struct nfc_dev *dev)
 {
        int rc;
 
-       nfc_dbg("dev_name=%s", dev_name(&dev->dev));
+       pr_debug("dev_name=%s\n", dev_name(&dev->dev));
 
        mutex_lock(&nfc_devlist_mutex);
        nfc_devlist_generation++;
@@ -490,8 +493,8 @@ void nfc_unregister_device(struct nfc_dev *dev)
 
        rc = nfc_genl_device_removed(dev);
        if (rc)
-               nfc_dbg("The userspace won't be notified that the device %s"
-                                       " was removed", dev_name(&dev->dev));
+               pr_debug("The userspace won't be notified that the device %s was removed\n",
+                        dev_name(&dev->dev));
 
 }
 EXPORT_SYMBOL(nfc_unregister_device);
@@ -500,7 +503,7 @@ static int __init nfc_init(void)
 {
        int rc;
 
-       nfc_info("NFC Core ver %s", VERSION);
+       pr_info("NFC Core ver %s\n", VERSION);
 
        rc = class_register(&nfc_class);
        if (rc)