aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpacpi
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/pnpacpi
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/pnpacpi')
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c20
1 files changed, 12 insertions, 8 deletions
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++;