aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 18:34:12 -0400
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:23 -0400
commitaf11cb2d521f9d7e10c565bafe8f2358772baa65 (patch)
tree3a3a5bfa30e5f25a94dcb83dbfa31691918d6c81 /drivers/pnp/isapnp
parent2cd1393098073426256cb4543c897f8c340d0b93 (diff)
PNP: use dev_printk when possible
Use dev_printk() when possible for more informative error messages. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-By: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/isapnp')
-rw-r--r--drivers/pnp/isapnp/core.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 6f1007548c93..990d8cd6295c 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -737,9 +737,8 @@ static int __init isapnp_create_device(struct pnp_card *card,
737 isapnp_skip_bytes(size); 737 isapnp_skip_bytes(size);
738 return 1; 738 return 1;
739 default: 739 default:
740 printk(KERN_ERR 740 dev_err(&dev->dev, "unknown tag %#x (card %i), "
741 "isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n", 741 "ignored\n", type, card->number);
742 type, dev->number, card->number);
743 } 742 }
744__skip: 743__skip:
745 if (size > 0) 744 if (size > 0)
@@ -792,9 +791,8 @@ static void __init isapnp_parse_resource_map(struct pnp_card *card)
792 isapnp_skip_bytes(size); 791 isapnp_skip_bytes(size);
793 return; 792 return;
794 default: 793 default:
795 printk(KERN_ERR 794 dev_err(&card->dev, "unknown tag %#x, ignored\n",
796 "isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n", 795 type);
797 type, card->number);
798 } 796 }
799__skip: 797__skip:
800 if (size > 0) 798 if (size > 0)
@@ -841,13 +839,6 @@ static int __init isapnp_build_device_list(void)
841 isapnp_wake(csn); 839 isapnp_wake(csn);
842 isapnp_peek(header, 9); 840 isapnp_peek(header, 9);
843 checksum = isapnp_checksum(header); 841 checksum = isapnp_checksum(header);
844#if 0
845 printk(KERN_DEBUG
846 "vendor: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
847 header[0], header[1], header[2], header[3], header[4],
848 header[5], header[6], header[7], header[8]);
849 printk(KERN_DEBUG "checksum = 0x%x\n", checksum);
850#endif
851 eisa_id = header[0] | header[1] << 8 | 842 eisa_id = header[0] | header[1] << 8 |
852 header[2] << 16 | header[3] << 24; 843 header[2] << 16 | header[3] << 24;
853 pnp_eisa_id_to_string(eisa_id, id); 844 pnp_eisa_id_to_string(eisa_id, id);
@@ -855,6 +846,13 @@ static int __init isapnp_build_device_list(void)
855 if (!card) 846 if (!card)
856 continue; 847 continue;
857 848
849#if 0
850 dev_info(&card->dev,
851 "vendor: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
852 header[0], header[1], header[2], header[3], header[4],
853 header[5], header[6], header[7], header[8]);
854 dev_info(&card->dev, "checksum = %#x\n", checksum);
855#endif
858 INIT_LIST_HEAD(&card->devices); 856 INIT_LIST_HEAD(&card->devices);
859 card->serial = 857 card->serial =
860 (header[7] << 24) | (header[6] << 16) | (header[5] << 8) | 858 (header[7] << 24) | (header[6] << 16) | (header[5] << 8) |
@@ -862,9 +860,8 @@ static int __init isapnp_build_device_list(void)
862 isapnp_checksum_value = 0x00; 860 isapnp_checksum_value = 0x00;
863 isapnp_parse_resource_map(card); 861 isapnp_parse_resource_map(card);
864 if (isapnp_checksum_value != 0x00) 862 if (isapnp_checksum_value != 0x00)
865 printk(KERN_ERR 863 dev_err(&card->dev, "invalid checksum %#x\n",
866 "isapnp: checksum for device %i is not valid (0x%x)\n", 864 isapnp_checksum_value);
867 csn, isapnp_checksum_value);
868 card->checksum = isapnp_checksum_value; 865 card->checksum = isapnp_checksum_value;
869 866
870 pnp_add_card(card); 867 pnp_add_card(card);
@@ -1134,13 +1131,13 @@ static int __init isapnp_init(void)
1134 protocol_for_each_card(&isapnp_protocol, card) { 1131 protocol_for_each_card(&isapnp_protocol, card) {
1135 cards++; 1132 cards++;
1136 if (isapnp_verbose) { 1133 if (isapnp_verbose) {
1137 printk(KERN_INFO "isapnp: Card '%s'\n", 1134 dev_info(&card->dev, "card '%s'\n",
1138 card->name[0] ? card->name : "Unknown"); 1135 card->name[0] ? card->name : "unknown");
1139 if (isapnp_verbose < 2) 1136 if (isapnp_verbose < 2)
1140 continue; 1137 continue;
1141 card_for_each_dev(card, dev) { 1138 card_for_each_dev(card, dev) {
1142 printk(KERN_INFO "isapnp: Device '%s'\n", 1139 dev_info(&card->dev, "device '%s'\n",
1143 dev->name[0] ? dev->name : "Unknown"); 1140 dev->name[0] ? dev->name : "unknown");
1144 } 1141 }
1145 } 1142 }
1146 } 1143 }