diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-09-20 10:56:40 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-09-24 20:02:34 -0400 |
commit | 260425308de63155a087361d961dafd2dd45e275 (patch) | |
tree | e403eed69452931025585b4584a84f7c880b5115 /net/nfc/digital_core.c | |
parent | c5da0e4a35eb1eba0c1593bef4bf2b58d9d50d6b (diff) |
NFC: digital: Add newline to pr_* calls
We do not add the newline to the pr_fmt macro, in order to give more
flexibility to the caller and to keep the logging style consistent with
the rest of the NFC and kernel code.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/digital_core.c')
-rw-r--r-- | net/nfc/digital_core.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/net/nfc/digital_core.c b/net/nfc/digital_core.c index 6f563d09b520..09fc95439955 100644 --- a/net/nfc/digital_core.c +++ b/net/nfc/digital_core.c | |||
@@ -198,14 +198,14 @@ static void digital_wq_cmd(struct work_struct *work) | |||
198 | break; | 198 | break; |
199 | 199 | ||
200 | default: | 200 | default: |
201 | pr_err("Unknown cmd type %d", cmd->type); | 201 | pr_err("Unknown cmd type %d\n", cmd->type); |
202 | return; | 202 | return; |
203 | } | 203 | } |
204 | 204 | ||
205 | if (!rc) | 205 | if (!rc) |
206 | return; | 206 | return; |
207 | 207 | ||
208 | pr_err("in_send_command returned err %d", rc); | 208 | pr_err("in_send_command returned err %d\n", rc); |
209 | 209 | ||
210 | mutex_lock(&ddev->cmd_lock); | 210 | mutex_lock(&ddev->cmd_lock); |
211 | list_del(&cmd->queue); | 211 | list_del(&cmd->queue); |
@@ -252,7 +252,7 @@ int digital_in_configure_hw(struct nfc_digital_dev *ddev, int type, int param) | |||
252 | 252 | ||
253 | rc = ddev->ops->in_configure_hw(ddev, type, param); | 253 | rc = ddev->ops->in_configure_hw(ddev, type, param); |
254 | if (rc) | 254 | if (rc) |
255 | pr_err("in_configure_hw failed: %d", rc); | 255 | pr_err("in_configure_hw failed: %d\n", rc); |
256 | 256 | ||
257 | return rc; | 257 | return rc; |
258 | } | 258 | } |
@@ -263,7 +263,7 @@ int digital_tg_configure_hw(struct nfc_digital_dev *ddev, int type, int param) | |||
263 | 263 | ||
264 | rc = ddev->ops->tg_configure_hw(ddev, type, param); | 264 | rc = ddev->ops->tg_configure_hw(ddev, type, param); |
265 | if (rc) | 265 | if (rc) |
266 | pr_err("tg_configure_hw failed: %d", rc); | 266 | pr_err("tg_configure_hw failed: %d\n", rc); |
267 | 267 | ||
268 | return rc; | 268 | return rc; |
269 | } | 269 | } |
@@ -332,11 +332,11 @@ int digital_target_found(struct nfc_digital_dev *ddev, | |||
332 | break; | 332 | break; |
333 | 333 | ||
334 | default: | 334 | default: |
335 | pr_err("Invalid protocol %d", protocol); | 335 | pr_err("Invalid protocol %d\n", protocol); |
336 | return -EINVAL; | 336 | return -EINVAL; |
337 | } | 337 | } |
338 | 338 | ||
339 | pr_debug("rf_tech=%d, protocol=%d", rf_tech, protocol); | 339 | pr_debug("rf_tech=%d, protocol=%d\n", rf_tech, protocol); |
340 | 340 | ||
341 | ddev->curr_rf_tech = rf_tech; | 341 | ddev->curr_rf_tech = rf_tech; |
342 | ddev->curr_protocol = protocol; | 342 | ddev->curr_protocol = protocol; |
@@ -434,24 +434,24 @@ static int digital_start_poll(struct nfc_dev *nfc_dev, __u32 im_protocols, | |||
434 | struct nfc_digital_dev *ddev = nfc_get_drvdata(nfc_dev); | 434 | struct nfc_digital_dev *ddev = nfc_get_drvdata(nfc_dev); |
435 | u32 matching_im_protocols, matching_tm_protocols; | 435 | u32 matching_im_protocols, matching_tm_protocols; |
436 | 436 | ||
437 | pr_debug("protocols: im 0x%x, tm 0x%x, supported 0x%x", im_protocols, | 437 | pr_debug("protocols: im 0x%x, tm 0x%x, supported 0x%x\n", im_protocols, |
438 | tm_protocols, ddev->protocols); | 438 | tm_protocols, ddev->protocols); |
439 | 439 | ||
440 | matching_im_protocols = ddev->protocols & im_protocols; | 440 | matching_im_protocols = ddev->protocols & im_protocols; |
441 | matching_tm_protocols = ddev->protocols & tm_protocols; | 441 | matching_tm_protocols = ddev->protocols & tm_protocols; |
442 | 442 | ||
443 | if (!matching_im_protocols && !matching_tm_protocols) { | 443 | if (!matching_im_protocols && !matching_tm_protocols) { |
444 | pr_err("No known protocol"); | 444 | pr_err("Unknown protocol\n"); |
445 | return -EINVAL; | 445 | return -EINVAL; |
446 | } | 446 | } |
447 | 447 | ||
448 | if (ddev->poll_tech_count) { | 448 | if (ddev->poll_tech_count) { |
449 | pr_err("Already polling"); | 449 | pr_err("Already polling\n"); |
450 | return -EBUSY; | 450 | return -EBUSY; |
451 | } | 451 | } |
452 | 452 | ||
453 | if (ddev->curr_protocol) { | 453 | if (ddev->curr_protocol) { |
454 | pr_err("A target is already active"); | 454 | pr_err("A target is already active\n"); |
455 | return -EBUSY; | 455 | return -EBUSY; |
456 | } | 456 | } |
457 | 457 | ||
@@ -487,7 +487,7 @@ static int digital_start_poll(struct nfc_dev *nfc_dev, __u32 im_protocols, | |||
487 | } | 487 | } |
488 | 488 | ||
489 | if (!ddev->poll_tech_count) { | 489 | if (!ddev->poll_tech_count) { |
490 | pr_err("Unsupported protocols: im=0x%x, tm=0x%x", | 490 | pr_err("Unsupported protocols: im=0x%x, tm=0x%x\n", |
491 | matching_im_protocols, matching_tm_protocols); | 491 | matching_im_protocols, matching_tm_protocols); |
492 | return -EINVAL; | 492 | return -EINVAL; |
493 | } | 493 | } |
@@ -504,7 +504,7 @@ static void digital_stop_poll(struct nfc_dev *nfc_dev) | |||
504 | mutex_lock(&ddev->poll_lock); | 504 | mutex_lock(&ddev->poll_lock); |
505 | 505 | ||
506 | if (!ddev->poll_tech_count) { | 506 | if (!ddev->poll_tech_count) { |
507 | pr_err("Polling operation was not running"); | 507 | pr_err("Polling operation was not running\n"); |
508 | mutex_unlock(&ddev->poll_lock); | 508 | mutex_unlock(&ddev->poll_lock); |
509 | return; | 509 | return; |
510 | } | 510 | } |
@@ -611,7 +611,7 @@ static int digital_in_send(struct nfc_dev *nfc_dev, struct nfc_target *target, | |||
611 | 611 | ||
612 | data_exch = kzalloc(sizeof(struct digital_data_exch), GFP_KERNEL); | 612 | data_exch = kzalloc(sizeof(struct digital_data_exch), GFP_KERNEL); |
613 | if (!data_exch) { | 613 | if (!data_exch) { |
614 | pr_err("Failed to allocate data_exch struct"); | 614 | pr_err("Failed to allocate data_exch struct\n"); |
615 | return -ENOMEM; | 615 | return -ENOMEM; |
616 | } | 616 | } |
617 | 617 | ||
@@ -653,10 +653,8 @@ struct nfc_digital_dev *nfc_digital_allocate_device(struct nfc_digital_ops *ops, | |||
653 | return NULL; | 653 | return NULL; |
654 | 654 | ||
655 | ddev = kzalloc(sizeof(struct nfc_digital_dev), GFP_KERNEL); | 655 | ddev = kzalloc(sizeof(struct nfc_digital_dev), GFP_KERNEL); |
656 | if (!ddev) { | 656 | if (!ddev) |
657 | pr_err("kzalloc failed"); | ||
658 | return NULL; | 657 | return NULL; |
659 | } | ||
660 | 658 | ||
661 | ddev->driver_capabilities = driver_capabilities; | 659 | ddev->driver_capabilities = driver_capabilities; |
662 | ddev->ops = ops; | 660 | ddev->ops = ops; |
@@ -686,7 +684,7 @@ struct nfc_digital_dev *nfc_digital_allocate_device(struct nfc_digital_ops *ops, | |||
686 | ddev->tx_headroom, | 684 | ddev->tx_headroom, |
687 | ddev->tx_tailroom); | 685 | ddev->tx_tailroom); |
688 | if (!ddev->nfc_dev) { | 686 | if (!ddev->nfc_dev) { |
689 | pr_err("nfc_allocate_device failed"); | 687 | pr_err("nfc_allocate_device failed\n"); |
690 | goto free_dev; | 688 | goto free_dev; |
691 | } | 689 | } |
692 | 690 | ||