diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/isapnp/core.c | 37 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 20 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/rsparser.c | 36 |
3 files changed, 43 insertions, 50 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 | } |
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 33dbf3644f2b..bd41e4d4270c 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -110,7 +110,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev, | |||
110 | p = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; | 110 | p = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; |
111 | 111 | ||
112 | if (triggering != t || polarity != p) { | 112 | if (triggering != t || polarity != p) { |
113 | pnp_warn("IRQ %d override to %s, %s", | 113 | dev_warn(&dev->dev, "IRQ %d override to %s, %s\n", |
114 | gsi, t ? "edge":"level", p ? "low":"high"); | 114 | gsi, t ? "edge":"level", p ? "low":"high"); |
115 | triggering = t; | 115 | triggering = t; |
116 | polarity = p; | 116 | polarity = p; |
@@ -263,7 +263,7 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | |||
263 | 263 | ||
264 | status = acpi_resource_to_address64(res, p); | 264 | status = acpi_resource_to_address64(res, p); |
265 | if (!ACPI_SUCCESS(status)) { | 265 | if (!ACPI_SUCCESS(status)) { |
266 | pnp_warn("PnPACPI: failed to convert resource type %d", | 266 | dev_warn(&dev->dev, "failed to convert resource type %d\n", |
267 | res->type); | 267 | res->type); |
268 | return; | 268 | return; |
269 | } | 269 | } |
@@ -397,7 +397,8 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, | |||
397 | break; | 397 | break; |
398 | 398 | ||
399 | default: | 399 | default: |
400 | pnp_warn("PnPACPI: unknown resource type %d", res->type); | 400 | dev_warn(&dev->dev, "unknown resource type %d in _CRS\n", |
401 | res->type); | ||
401 | return AE_ERROR; | 402 | return AE_ERROR; |
402 | } | 403 | } |
403 | 404 | ||
@@ -674,7 +675,8 @@ static __init acpi_status pnpacpi_option_resource(struct acpi_resource *res, | |||
674 | case ACPI_RESOURCE_TYPE_END_DEPENDENT: | 675 | case ACPI_RESOURCE_TYPE_END_DEPENDENT: |
675 | /*only one EndDependentFn is allowed */ | 676 | /*only one EndDependentFn is allowed */ |
676 | if (!parse_data->option_independent) { | 677 | if (!parse_data->option_independent) { |
677 | pnp_warn("PnPACPI: more than one EndDependentFn"); | 678 | dev_warn(&dev->dev, "more than one EndDependentFn " |
679 | "in _PRS\n"); | ||
678 | return AE_ERROR; | 680 | return AE_ERROR; |
679 | } | 681 | } |
680 | parse_data->option = parse_data->option_independent; | 682 | parse_data->option = parse_data->option_independent; |
@@ -726,7 +728,8 @@ static __init acpi_status pnpacpi_option_resource(struct acpi_resource *res, | |||
726 | break; | 728 | break; |
727 | 729 | ||
728 | default: | 730 | default: |
729 | pnp_warn("PnPACPI: unknown resource type %d", res->type); | 731 | dev_warn(&dev->dev, "unknown resource type %d in _PRS\n", |
732 | res->type); | ||
730 | return AE_ERROR; | 733 | return AE_ERROR; |
731 | } | 734 | } |
732 | 735 | ||
@@ -808,7 +811,7 @@ int pnpacpi_build_resource_template(struct pnp_dev *dev, | |||
808 | status = acpi_walk_resources(handle, METHOD_NAME__CRS, | 811 | status = acpi_walk_resources(handle, METHOD_NAME__CRS, |
809 | pnpacpi_count_resources, &res_cnt); | 812 | pnpacpi_count_resources, &res_cnt); |
810 | if (ACPI_FAILURE(status)) { | 813 | if (ACPI_FAILURE(status)) { |
811 | pnp_err("Evaluate _CRS failed"); | 814 | dev_err(&dev->dev, "can't evaluate _CRS\n"); |
812 | return -EINVAL; | 815 | return -EINVAL; |
813 | } | 816 | } |
814 | if (!res_cnt) | 817 | if (!res_cnt) |
@@ -823,7 +826,7 @@ int pnpacpi_build_resource_template(struct pnp_dev *dev, | |||
823 | pnpacpi_type_resources, &resource); | 826 | pnpacpi_type_resources, &resource); |
824 | if (ACPI_FAILURE(status)) { | 827 | if (ACPI_FAILURE(status)) { |
825 | kfree(buffer->pointer); | 828 | kfree(buffer->pointer); |
826 | pnp_err("Evaluate _CRS failed"); | 829 | dev_err(&dev->dev, "can't evaluate _CRS\n"); |
827 | return -EINVAL; | 830 | return -EINVAL; |
828 | } | 831 | } |
829 | /* resource will pointer the end resource now */ | 832 | /* resource will pointer the end resource now */ |
@@ -1074,7 +1077,8 @@ int pnpacpi_encode_resources(struct pnp_dev *dev, struct acpi_buffer *buffer) | |||
1074 | case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64: | 1077 | case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64: |
1075 | case ACPI_RESOURCE_TYPE_GENERIC_REGISTER: | 1078 | case ACPI_RESOURCE_TYPE_GENERIC_REGISTER: |
1076 | default: /* other type */ | 1079 | default: /* other type */ |
1077 | pnp_warn("unknown resource type %d", resource->type); | 1080 | dev_warn(&dev->dev, "can't encode unknown resource " |
1081 | "type %d\n", resource->type); | ||
1078 | return -EINVAL; | 1082 | return -EINVAL; |
1079 | } | 1083 | } |
1080 | resource++; | 1084 | resource++; |
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index e90a3d4360b2..4390e3b41df0 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -241,9 +241,8 @@ static unsigned char *pnpbios_parse_allocated_resource_data(struct pnp_dev *dev, | |||
241 | 241 | ||
242 | default: /* an unkown tag */ | 242 | default: /* an unkown tag */ |
243 | len_err: | 243 | len_err: |
244 | printk(KERN_ERR | 244 | dev_err(&dev->dev, "unknown tag %#x length %d\n", |
245 | "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", | 245 | tag, len); |
246 | tag, len); | ||
247 | break; | 246 | break; |
248 | } | 247 | } |
249 | 248 | ||
@@ -254,8 +253,7 @@ len_err: | |||
254 | p += len + 1; | 253 | p += len + 1; |
255 | } | 254 | } |
256 | 255 | ||
257 | printk(KERN_ERR | 256 | dev_err(&dev->dev, "no end tag in resource structure\n"); |
258 | "PnPBIOS: Resource structure does not contain an end tag.\n"); | ||
259 | 257 | ||
260 | return NULL; | 258 | return NULL; |
261 | } | 259 | } |
@@ -471,8 +469,8 @@ pnpbios_parse_resource_option_data(unsigned char *p, unsigned char *end, | |||
471 | if (len != 0) | 469 | if (len != 0) |
472 | goto len_err; | 470 | goto len_err; |
473 | if (option_independent == option) | 471 | if (option_independent == option) |
474 | printk(KERN_WARNING | 472 | dev_warn(&dev->dev, "missing " |
475 | "PnPBIOS: Missing SMALL_TAG_STARTDEP tag\n"); | 473 | "SMALL_TAG_STARTDEP tag\n"); |
476 | option = option_independent; | 474 | option = option_independent; |
477 | dev_dbg(&dev->dev, "end dependent options\n"); | 475 | dev_dbg(&dev->dev, "end dependent options\n"); |
478 | break; | 476 | break; |
@@ -482,9 +480,8 @@ pnpbios_parse_resource_option_data(unsigned char *p, unsigned char *end, | |||
482 | 480 | ||
483 | default: /* an unkown tag */ | 481 | default: /* an unkown tag */ |
484 | len_err: | 482 | len_err: |
485 | printk(KERN_ERR | 483 | dev_err(&dev->dev, "unknown tag %#x length %d\n", |
486 | "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", | 484 | tag, len); |
487 | tag, len); | ||
488 | break; | 485 | break; |
489 | } | 486 | } |
490 | 487 | ||
@@ -495,8 +492,7 @@ len_err: | |||
495 | p += len + 1; | 492 | p += len + 1; |
496 | } | 493 | } |
497 | 494 | ||
498 | printk(KERN_ERR | 495 | dev_err(&dev->dev, "no end tag in resource structure\n"); |
499 | "PnPBIOS: Resource structure does not contain an end tag.\n"); | ||
500 | 496 | ||
501 | return NULL; | 497 | return NULL; |
502 | } | 498 | } |
@@ -554,9 +550,8 @@ static unsigned char *pnpbios_parse_compatible_ids(unsigned char *p, | |||
554 | 550 | ||
555 | default: /* an unkown tag */ | 551 | default: /* an unkown tag */ |
556 | len_err: | 552 | len_err: |
557 | printk(KERN_ERR | 553 | dev_err(&dev->dev, "unknown tag %#x length %d\n", |
558 | "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", | 554 | tag, len); |
559 | tag, len); | ||
560 | break; | 555 | break; |
561 | } | 556 | } |
562 | 557 | ||
@@ -567,8 +562,7 @@ len_err: | |||
567 | p += len + 1; | 562 | p += len + 1; |
568 | } | 563 | } |
569 | 564 | ||
570 | printk(KERN_ERR | 565 | dev_err(&dev->dev, "no end tag in resource structure\n"); |
571 | "PnPBIOS: Resource structure does not contain an end tag.\n"); | ||
572 | 566 | ||
573 | return NULL; | 567 | return NULL; |
574 | } | 568 | } |
@@ -774,9 +768,8 @@ static unsigned char *pnpbios_encode_allocated_resource_data(struct pnp_dev | |||
774 | 768 | ||
775 | default: /* an unkown tag */ | 769 | default: /* an unkown tag */ |
776 | len_err: | 770 | len_err: |
777 | printk(KERN_ERR | 771 | dev_err(&dev->dev, "unknown tag %#x length %d\n", |
778 | "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", | 772 | tag, len); |
779 | tag, len); | ||
780 | break; | 773 | break; |
781 | } | 774 | } |
782 | 775 | ||
@@ -787,8 +780,7 @@ len_err: | |||
787 | p += len + 1; | 780 | p += len + 1; |
788 | } | 781 | } |
789 | 782 | ||
790 | printk(KERN_ERR | 783 | dev_err(&dev->dev, "no end tag in resource structure\n"); |
791 | "PnPBIOS: Resource structure does not contain an end tag.\n"); | ||
792 | 784 | ||
793 | return NULL; | 785 | return NULL; |
794 | } | 786 | } |