diff options
author | Joe Perches <joe@perches.com> | 2011-05-02 19:49:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-11 13:03:20 -0400 |
commit | 0e4e06ae5e895864b4a4bca7eec2e3015fddca98 (patch) | |
tree | e4632ffd53eef98c302a11d732c491703368b9ed /drivers/net/wireless/libertas/if_cs.c | |
parent | 9fcce61c0eddbe21f42cb47bd5a366a6eb7956ce (diff) |
libertas: Convert lbs_pr_<level> to pr_<level>
Use the standard pr_<level> functions eases grep a bit.
Added a few missing terminating newlines to messages.
Coalesced long formats.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_cs.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_cs.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 4dfd48fe8b6..f2d10115f5e 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
24 | #include <linux/module.h> | 26 | #include <linux/module.h> |
25 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
26 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
@@ -362,7 +364,7 @@ static int if_cs_send_cmd(struct lbs_private *priv, u8 *buf, u16 nb) | |||
362 | if (status & IF_CS_BIT_COMMAND) | 364 | if (status & IF_CS_BIT_COMMAND) |
363 | break; | 365 | break; |
364 | if (++loops > 100) { | 366 | if (++loops > 100) { |
365 | lbs_pr_err("card not ready for commands\n"); | 367 | pr_err("card not ready for commands\n"); |
366 | goto done; | 368 | goto done; |
367 | } | 369 | } |
368 | mdelay(1); | 370 | mdelay(1); |
@@ -432,14 +434,14 @@ static int if_cs_receive_cmdres(struct lbs_private *priv, u8 *data, u32 *len) | |||
432 | /* is hardware ready? */ | 434 | /* is hardware ready? */ |
433 | status = if_cs_read16(priv->card, IF_CS_CARD_STATUS); | 435 | status = if_cs_read16(priv->card, IF_CS_CARD_STATUS); |
434 | if ((status & IF_CS_BIT_RESP) == 0) { | 436 | if ((status & IF_CS_BIT_RESP) == 0) { |
435 | lbs_pr_err("no cmd response in card\n"); | 437 | pr_err("no cmd response in card\n"); |
436 | *len = 0; | 438 | *len = 0; |
437 | goto out; | 439 | goto out; |
438 | } | 440 | } |
439 | 441 | ||
440 | *len = if_cs_read16(priv->card, IF_CS_RESP_LEN); | 442 | *len = if_cs_read16(priv->card, IF_CS_RESP_LEN); |
441 | if ((*len == 0) || (*len > LBS_CMD_BUFFER_SIZE)) { | 443 | if ((*len == 0) || (*len > LBS_CMD_BUFFER_SIZE)) { |
442 | lbs_pr_err("card cmd buffer has invalid # of bytes (%d)\n", *len); | 444 | pr_err("card cmd buffer has invalid # of bytes (%d)\n", *len); |
443 | goto out; | 445 | goto out; |
444 | } | 446 | } |
445 | 447 | ||
@@ -473,7 +475,7 @@ static struct sk_buff *if_cs_receive_data(struct lbs_private *priv) | |||
473 | 475 | ||
474 | len = if_cs_read16(priv->card, IF_CS_READ_LEN); | 476 | len = if_cs_read16(priv->card, IF_CS_READ_LEN); |
475 | if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) { | 477 | if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) { |
476 | lbs_pr_err("card data buffer has invalid # of bytes (%d)\n", len); | 478 | pr_err("card data buffer has invalid # of bytes (%d)\n", len); |
477 | priv->dev->stats.rx_dropped++; | 479 | priv->dev->stats.rx_dropped++; |
478 | goto dat_err; | 480 | goto dat_err; |
479 | } | 481 | } |
@@ -653,8 +655,8 @@ static int if_cs_prog_helper(struct if_cs_card *card, const struct firmware *fw) | |||
653 | ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS, | 655 | ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS, |
654 | IF_CS_BIT_COMMAND); | 656 | IF_CS_BIT_COMMAND); |
655 | if (ret < 0) { | 657 | if (ret < 0) { |
656 | lbs_pr_err("can't download helper at 0x%x, ret %d\n", | 658 | pr_err("can't download helper at 0x%x, ret %d\n", |
657 | sent, ret); | 659 | sent, ret); |
658 | goto done; | 660 | goto done; |
659 | } | 661 | } |
660 | 662 | ||
@@ -684,7 +686,7 @@ static int if_cs_prog_real(struct if_cs_card *card, const struct firmware *fw) | |||
684 | ret = if_cs_poll_while_fw_download(card, IF_CS_SQ_READ_LOW, | 686 | ret = if_cs_poll_while_fw_download(card, IF_CS_SQ_READ_LOW, |
685 | IF_CS_SQ_HELPER_OK); | 687 | IF_CS_SQ_HELPER_OK); |
686 | if (ret < 0) { | 688 | if (ret < 0) { |
687 | lbs_pr_err("helper firmware doesn't answer\n"); | 689 | pr_err("helper firmware doesn't answer\n"); |
688 | goto done; | 690 | goto done; |
689 | } | 691 | } |
690 | 692 | ||
@@ -692,13 +694,13 @@ static int if_cs_prog_real(struct if_cs_card *card, const struct firmware *fw) | |||
692 | len = if_cs_read16(card, IF_CS_SQ_READ_LOW); | 694 | len = if_cs_read16(card, IF_CS_SQ_READ_LOW); |
693 | if (len & 1) { | 695 | if (len & 1) { |
694 | retry++; | 696 | retry++; |
695 | lbs_pr_info("odd, need to retry this firmware block\n"); | 697 | pr_info("odd, need to retry this firmware block\n"); |
696 | } else { | 698 | } else { |
697 | retry = 0; | 699 | retry = 0; |
698 | } | 700 | } |
699 | 701 | ||
700 | if (retry > 20) { | 702 | if (retry > 20) { |
701 | lbs_pr_err("could not download firmware\n"); | 703 | pr_err("could not download firmware\n"); |
702 | ret = -ENODEV; | 704 | ret = -ENODEV; |
703 | goto done; | 705 | goto done; |
704 | } | 706 | } |
@@ -718,14 +720,14 @@ static int if_cs_prog_real(struct if_cs_card *card, const struct firmware *fw) | |||
718 | ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS, | 720 | ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS, |
719 | IF_CS_BIT_COMMAND); | 721 | IF_CS_BIT_COMMAND); |
720 | if (ret < 0) { | 722 | if (ret < 0) { |
721 | lbs_pr_err("can't download firmware at 0x%x\n", sent); | 723 | pr_err("can't download firmware at 0x%x\n", sent); |
722 | goto done; | 724 | goto done; |
723 | } | 725 | } |
724 | } | 726 | } |
725 | 727 | ||
726 | ret = if_cs_poll_while_fw_download(card, IF_CS_SCRATCH, 0x5a); | 728 | ret = if_cs_poll_while_fw_download(card, IF_CS_SCRATCH, 0x5a); |
727 | if (ret < 0) | 729 | if (ret < 0) |
728 | lbs_pr_err("firmware download failed\n"); | 730 | pr_err("firmware download failed\n"); |
729 | 731 | ||
730 | done: | 732 | done: |
731 | lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret); | 733 | lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret); |
@@ -759,7 +761,7 @@ static int if_cs_host_to_card(struct lbs_private *priv, | |||
759 | ret = if_cs_send_cmd(priv, buf, nb); | 761 | ret = if_cs_send_cmd(priv, buf, nb); |
760 | break; | 762 | break; |
761 | default: | 763 | default: |
762 | lbs_pr_err("%s: unsupported type %d\n", __func__, type); | 764 | pr_err("%s: unsupported type %d\n", __func__, type); |
763 | } | 765 | } |
764 | 766 | ||
765 | lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret); | 767 | lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret); |
@@ -788,7 +790,7 @@ static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data) | |||
788 | p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | 790 | p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
789 | 791 | ||
790 | if (p_dev->resource[1]->end) { | 792 | if (p_dev->resource[1]->end) { |
791 | lbs_pr_err("wrong CIS (check number of IO windows)\n"); | 793 | pr_err("wrong CIS (check number of IO windows)\n"); |
792 | return -ENODEV; | 794 | return -ENODEV; |
793 | } | 795 | } |
794 | 796 | ||
@@ -809,7 +811,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
809 | 811 | ||
810 | card = kzalloc(sizeof(struct if_cs_card), GFP_KERNEL); | 812 | card = kzalloc(sizeof(struct if_cs_card), GFP_KERNEL); |
811 | if (!card) { | 813 | if (!card) { |
812 | lbs_pr_err("error in kzalloc\n"); | 814 | pr_err("error in kzalloc\n"); |
813 | goto out; | 815 | goto out; |
814 | } | 816 | } |
815 | card->p_dev = p_dev; | 817 | card->p_dev = p_dev; |
@@ -818,7 +820,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
818 | p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; | 820 | p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; |
819 | 821 | ||
820 | if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { | 822 | if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { |
821 | lbs_pr_err("error in pcmcia_loop_config\n"); | 823 | pr_err("error in pcmcia_loop_config\n"); |
822 | goto out1; | 824 | goto out1; |
823 | } | 825 | } |
824 | 826 | ||
@@ -834,14 +836,14 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
834 | card->iobase = ioport_map(p_dev->resource[0]->start, | 836 | card->iobase = ioport_map(p_dev->resource[0]->start, |
835 | resource_size(p_dev->resource[0])); | 837 | resource_size(p_dev->resource[0])); |
836 | if (!card->iobase) { | 838 | if (!card->iobase) { |
837 | lbs_pr_err("error in ioport_map\n"); | 839 | pr_err("error in ioport_map\n"); |
838 | ret = -EIO; | 840 | ret = -EIO; |
839 | goto out1; | 841 | goto out1; |
840 | } | 842 | } |
841 | 843 | ||
842 | ret = pcmcia_enable_device(p_dev); | 844 | ret = pcmcia_enable_device(p_dev); |
843 | if (ret) { | 845 | if (ret) { |
844 | lbs_pr_err("error in pcmcia_enable_device\n"); | 846 | pr_err("error in pcmcia_enable_device\n"); |
845 | goto out2; | 847 | goto out2; |
846 | } | 848 | } |
847 | 849 | ||
@@ -856,8 +858,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
856 | 858 | ||
857 | card->model = get_model(p_dev->manf_id, p_dev->card_id); | 859 | card->model = get_model(p_dev->manf_id, p_dev->card_id); |
858 | if (card->model == MODEL_UNKNOWN) { | 860 | if (card->model == MODEL_UNKNOWN) { |
859 | lbs_pr_err("unsupported manf_id 0x%04x / card_id 0x%04x\n", | 861 | pr_err("unsupported manf_id 0x%04x / card_id 0x%04x\n", |
860 | p_dev->manf_id, p_dev->card_id); | 862 | p_dev->manf_id, p_dev->card_id); |
861 | goto out2; | 863 | goto out2; |
862 | } | 864 | } |
863 | 865 | ||
@@ -866,20 +868,20 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
866 | if (card->model == MODEL_8305) { | 868 | if (card->model == MODEL_8305) { |
867 | card->align_regs = 1; | 869 | card->align_regs = 1; |
868 | if (prod_id < IF_CS_CF8305_B1_REV) { | 870 | if (prod_id < IF_CS_CF8305_B1_REV) { |
869 | lbs_pr_err("8305 rev B0 and older are not supported\n"); | 871 | pr_err("8305 rev B0 and older are not supported\n"); |
870 | ret = -ENODEV; | 872 | ret = -ENODEV; |
871 | goto out2; | 873 | goto out2; |
872 | } | 874 | } |
873 | } | 875 | } |
874 | 876 | ||
875 | if ((card->model == MODEL_8381) && prod_id < IF_CS_CF8381_B3_REV) { | 877 | if ((card->model == MODEL_8381) && prod_id < IF_CS_CF8381_B3_REV) { |
876 | lbs_pr_err("8381 rev B2 and older are not supported\n"); | 878 | pr_err("8381 rev B2 and older are not supported\n"); |
877 | ret = -ENODEV; | 879 | ret = -ENODEV; |
878 | goto out2; | 880 | goto out2; |
879 | } | 881 | } |
880 | 882 | ||
881 | if ((card->model == MODEL_8385) && prod_id < IF_CS_CF8385_B1_REV) { | 883 | if ((card->model == MODEL_8385) && prod_id < IF_CS_CF8385_B1_REV) { |
882 | lbs_pr_err("8385 rev B0 and older are not supported\n"); | 884 | pr_err("8385 rev B0 and older are not supported\n"); |
883 | ret = -ENODEV; | 885 | ret = -ENODEV; |
884 | goto out2; | 886 | goto out2; |
885 | } | 887 | } |
@@ -887,7 +889,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
887 | ret = lbs_get_firmware(&p_dev->dev, NULL, NULL, card->model, | 889 | ret = lbs_get_firmware(&p_dev->dev, NULL, NULL, card->model, |
888 | &fw_table[0], &helper, &mainfw); | 890 | &fw_table[0], &helper, &mainfw); |
889 | if (ret) { | 891 | if (ret) { |
890 | lbs_pr_err("failed to find firmware (%d)\n", ret); | 892 | pr_err("failed to find firmware (%d)\n", ret); |
891 | goto out2; | 893 | goto out2; |
892 | } | 894 | } |
893 | 895 | ||
@@ -918,7 +920,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
918 | ret = request_irq(p_dev->irq, if_cs_interrupt, | 920 | ret = request_irq(p_dev->irq, if_cs_interrupt, |
919 | IRQF_SHARED, DRV_NAME, card); | 921 | IRQF_SHARED, DRV_NAME, card); |
920 | if (ret) { | 922 | if (ret) { |
921 | lbs_pr_err("error in request_irq\n"); | 923 | pr_err("error in request_irq\n"); |
922 | goto out3; | 924 | goto out3; |
923 | } | 925 | } |
924 | 926 | ||
@@ -931,7 +933,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
931 | 933 | ||
932 | /* And finally bring the card up */ | 934 | /* And finally bring the card up */ |
933 | if (lbs_start_card(priv) != 0) { | 935 | if (lbs_start_card(priv) != 0) { |
934 | lbs_pr_err("could not activate card\n"); | 936 | pr_err("could not activate card\n"); |
935 | goto out3; | 937 | goto out3; |
936 | } | 938 | } |
937 | 939 | ||