summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 16:34:12 -0600
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:23 -0400
commitaf11cb2d521f9d7e10c565bafe8f2358772baa65 (patch)
tree3a3a5bfa30e5f25a94dcb83dbfa31691918d6c81 /drivers/pnp/isapnp
parent2cd1393098073426256cb4543c897f8c340d0b93 (diff)
downloadlinux-af11cb2d521f9d7e10c565bafe8f2358772baa65.tar.gz
linux-af11cb2d521f9d7e10c565bafe8f2358772baa65.tar.bz2
linux-af11cb2d521f9d7e10c565bafe8f2358772baa65.zip
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,
isapnp_skip_bytes(size);
return 1;
default:
- printk(KERN_ERR
- "isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n",
- type, dev->number, card->number);
+ dev_err(&dev->dev, "unknown tag %#x (card %i), "
+ "ignored\n", type, card->number);
}
__skip:
if (size > 0)
@@ -792,9 +791,8 @@ static void __init isapnp_parse_resource_map(struct pnp_card *card)
isapnp_skip_bytes(size);
return;
default:
- printk(KERN_ERR
- "isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n",
- type, card->number);
+ dev_err(&card->dev, "unknown tag %#x, ignored\n",
+ type);
}
__skip:
if (size > 0)
@@ -841,13 +839,6 @@ static int __init isapnp_build_device_list(void)
isapnp_wake(csn);
isapnp_peek(header, 9);
checksum = isapnp_checksum(header);
-#if 0
- printk(KERN_DEBUG
- "vendor: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
- header[0], header[1], header[2], header[3], header[4],
- header[5], header[6], header[7], header[8]);
- printk(KERN_DEBUG "checksum = 0x%x\n", checksum);
-#endif
eisa_id = header[0] | header[1] << 8 |
header[2] << 16 | header[3] << 24;
pnp_eisa_id_to_string(eisa_id, id);
@@ -855,6 +846,13 @@ static int __init isapnp_build_device_list(void)
if (!card)
continue;
+#if 0
+ dev_info(&card->dev,
+ "vendor: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
+ header[0], header[1], header[2], header[3], header[4],
+ header[5], header[6], header[7], header[8]);
+ dev_info(&card->dev, "checksum = %#x\n", checksum);
+#endif
INIT_LIST_HEAD(&card->devices);
card->serial =
(header[7] << 24) | (header[6] << 16) | (header[5] << 8) |
@@ -862,9 +860,8 @@ static int __init isapnp_build_device_list(void)
isapnp_checksum_value = 0x00;
isapnp_parse_resource_map(card);
if (isapnp_checksum_value != 0x00)
- printk(KERN_ERR
- "isapnp: checksum for device %i is not valid (0x%x)\n",
- csn, isapnp_checksum_value);
+ dev_err(&card->dev, "invalid checksum %#x\n",
+ isapnp_checksum_value);
card->checksum = isapnp_checksum_value;
pnp_add_card(card);
@@ -1134,13 +1131,13 @@ static int __init isapnp_init(void)
protocol_for_each_card(&isapnp_protocol, card) {
cards++;
if (isapnp_verbose) {
- printk(KERN_INFO "isapnp: Card '%s'\n",
- card->name[0] ? card->name : "Unknown");
+ dev_info(&card->dev, "card '%s'\n",
+ card->name[0] ? card->name : "unknown");
if (isapnp_verbose < 2)
continue;
card_for_each_dev(card, dev) {
- printk(KERN_INFO "isapnp: Device '%s'\n",
- dev->name[0] ? dev->name : "Unknown");
+ dev_info(&card->dev, "device '%s'\n",
+ dev->name[0] ? dev->name : "unknown");
}
}
}