diff options
author | Joe Perches <joe@perches.com> | 2011-11-29 14:37:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-30 15:08:36 -0500 |
commit | ed1e0ad8816389ceefa2d94a9a3d3520088e410f (patch) | |
tree | bb15b4ed37d9e43f8ac1501f9fac26a808a36c22 /net/nfc/nci/core.c | |
parent | acda130b0e615596c63640f05febb02d2e681dde (diff) |
nfc: Use standard logging styles
Using the normal logging styles is preferred over
subsystem specific styles when the subsystem does
not take a specific struct.
Convert nfc_<level> specific messages to pr_<level>
Add newlines to uses.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/nci/core.c')
-rw-r--r-- | net/nfc/nci/core.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index fe5ca89abfce..30032b2c685c 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
29 | |||
28 | #include <linux/types.h> | 30 | #include <linux/types.h> |
29 | #include <linux/workqueue.h> | 31 | #include <linux/workqueue.h> |
30 | #include <linux/completion.h> | 32 | #include <linux/completion.h> |
@@ -96,8 +98,8 @@ static int __nci_request(struct nci_dev *ndev, | |||
96 | break; | 98 | break; |
97 | } | 99 | } |
98 | } else { | 100 | } else { |
99 | nfc_err("wait_for_completion_interruptible_timeout failed %ld", | 101 | pr_err("wait_for_completion_interruptible_timeout failed %ld\n", |
100 | completion_rc); | 102 | completion_rc); |
101 | 103 | ||
102 | rc = ((completion_rc == 0) ? (-ETIMEDOUT) : (completion_rc)); | 104 | rc = ((completion_rc == 0) ? (-ETIMEDOUT) : (completion_rc)); |
103 | } | 105 | } |
@@ -355,12 +357,12 @@ static int nci_start_poll(struct nfc_dev *nfc_dev, __u32 protocols) | |||
355 | nfc_dbg("entry"); | 357 | nfc_dbg("entry"); |
356 | 358 | ||
357 | if (test_bit(NCI_DISCOVERY, &ndev->flags)) { | 359 | if (test_bit(NCI_DISCOVERY, &ndev->flags)) { |
358 | nfc_err("unable to start poll, since poll is already active"); | 360 | pr_err("unable to start poll, since poll is already active\n"); |
359 | return -EBUSY; | 361 | return -EBUSY; |
360 | } | 362 | } |
361 | 363 | ||
362 | if (ndev->target_active_prot) { | 364 | if (ndev->target_active_prot) { |
363 | nfc_err("there is an active target"); | 365 | pr_err("there is an active target\n"); |
364 | return -EBUSY; | 366 | return -EBUSY; |
365 | } | 367 | } |
366 | 368 | ||
@@ -389,7 +391,7 @@ static void nci_stop_poll(struct nfc_dev *nfc_dev) | |||
389 | nfc_dbg("entry"); | 391 | nfc_dbg("entry"); |
390 | 392 | ||
391 | if (!test_bit(NCI_DISCOVERY, &ndev->flags)) { | 393 | if (!test_bit(NCI_DISCOVERY, &ndev->flags)) { |
392 | nfc_err("unable to stop poll, since poll is not active"); | 394 | pr_err("unable to stop poll, since poll is not active\n"); |
393 | return; | 395 | return; |
394 | } | 396 | } |
395 | 397 | ||
@@ -405,18 +407,18 @@ static int nci_activate_target(struct nfc_dev *nfc_dev, __u32 target_idx, | |||
405 | nfc_dbg("entry, target_idx %d, protocol 0x%x", target_idx, protocol); | 407 | nfc_dbg("entry, target_idx %d, protocol 0x%x", target_idx, protocol); |
406 | 408 | ||
407 | if (!test_bit(NCI_POLL_ACTIVE, &ndev->flags)) { | 409 | if (!test_bit(NCI_POLL_ACTIVE, &ndev->flags)) { |
408 | nfc_err("there is no available target to activate"); | 410 | pr_err("there is no available target to activate\n"); |
409 | return -EINVAL; | 411 | return -EINVAL; |
410 | } | 412 | } |
411 | 413 | ||
412 | if (ndev->target_active_prot) { | 414 | if (ndev->target_active_prot) { |
413 | nfc_err("there is already an active target"); | 415 | pr_err("there is already an active target\n"); |
414 | return -EBUSY; | 416 | return -EBUSY; |
415 | } | 417 | } |
416 | 418 | ||
417 | if (!(ndev->target_available_prots & (1 << protocol))) { | 419 | if (!(ndev->target_available_prots & (1 << protocol))) { |
418 | nfc_err("target does not support the requested protocol 0x%x", | 420 | pr_err("target does not support the requested protocol 0x%x\n", |
419 | protocol); | 421 | protocol); |
420 | return -EINVAL; | 422 | return -EINVAL; |
421 | } | 423 | } |
422 | 424 | ||
@@ -433,7 +435,7 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev, __u32 target_idx) | |||
433 | nfc_dbg("entry, target_idx %d", target_idx); | 435 | nfc_dbg("entry, target_idx %d", target_idx); |
434 | 436 | ||
435 | if (!ndev->target_active_prot) { | 437 | if (!ndev->target_active_prot) { |
436 | nfc_err("unable to deactivate target, no active target"); | 438 | pr_err("unable to deactivate target, no active target\n"); |
437 | return; | 439 | return; |
438 | } | 440 | } |
439 | 441 | ||
@@ -456,7 +458,7 @@ static int nci_data_exchange(struct nfc_dev *nfc_dev, __u32 target_idx, | |||
456 | nfc_dbg("entry, target_idx %d, len %d", target_idx, skb->len); | 458 | nfc_dbg("entry, target_idx %d, len %d", target_idx, skb->len); |
457 | 459 | ||
458 | if (!ndev->target_active_prot) { | 460 | if (!ndev->target_active_prot) { |
459 | nfc_err("unable to exchange data, no active target"); | 461 | pr_err("unable to exchange data, no active target\n"); |
460 | return -EINVAL; | 462 | return -EINVAL; |
461 | } | 463 | } |
462 | 464 | ||
@@ -685,7 +687,7 @@ int nci_send_cmd(struct nci_dev *ndev, __u16 opcode, __u8 plen, void *payload) | |||
685 | 687 | ||
686 | skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL); | 688 | skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL); |
687 | if (!skb) { | 689 | if (!skb) { |
688 | nfc_err("no memory for command"); | 690 | pr_err("no memory for command\n"); |
689 | return -ENOMEM; | 691 | return -ENOMEM; |
690 | } | 692 | } |
691 | 693 | ||
@@ -760,7 +762,7 @@ static void nci_rx_work(struct work_struct *work) | |||
760 | break; | 762 | break; |
761 | 763 | ||
762 | default: | 764 | default: |
763 | nfc_err("unknown MT 0x%x", nci_mt(skb->data)); | 765 | pr_err("unknown MT 0x%x\n", nci_mt(skb->data)); |
764 | kfree_skb(skb); | 766 | kfree_skb(skb); |
765 | break; | 767 | break; |
766 | } | 768 | } |