diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-08-19 18:53:21 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-10 23:24:27 -0400 |
commit | 958a1fdd3904b009c926cb840be48ce3c5f2389e (patch) | |
tree | fd97e652aef51f8fd11617fa33a4a5a8235a71f8 /drivers | |
parent | 6a0b93bae96f292b6c091cce5abfb9a644e649e9 (diff) |
PNPACPI: use dev_printk when possible
Use dev_printk() when possible for more informative error messages.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 95015cbfd33f..0461d4b82c46 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -132,7 +132,8 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev, | |||
132 | pnp_add_irq_resource(dev, irq, flags); | 132 | pnp_add_irq_resource(dev, irq, flags); |
133 | } | 133 | } |
134 | 134 | ||
135 | static int dma_flags(int type, int bus_master, int transfer) | 135 | static int dma_flags(struct pnp_dev *dev, int type, int bus_master, |
136 | int transfer) | ||
136 | { | 137 | { |
137 | int flags = 0; | 138 | int flags = 0; |
138 | 139 | ||
@@ -154,7 +155,7 @@ static int dma_flags(int type, int bus_master, int transfer) | |||
154 | default: | 155 | default: |
155 | /* Set a default value ? */ | 156 | /* Set a default value ? */ |
156 | flags |= IORESOURCE_DMA_COMPATIBLE; | 157 | flags |= IORESOURCE_DMA_COMPATIBLE; |
157 | pnp_err("Invalid DMA type"); | 158 | dev_err(&dev->dev, "invalid DMA type %d\n", type); |
158 | } | 159 | } |
159 | switch (transfer) { | 160 | switch (transfer) { |
160 | case ACPI_TRANSFER_8: | 161 | case ACPI_TRANSFER_8: |
@@ -169,7 +170,7 @@ static int dma_flags(int type, int bus_master, int transfer) | |||
169 | default: | 170 | default: |
170 | /* Set a default value ? */ | 171 | /* Set a default value ? */ |
171 | flags |= IORESOURCE_DMA_8AND16BIT; | 172 | flags |= IORESOURCE_DMA_8AND16BIT; |
172 | pnp_err("Invalid DMA transfer type"); | 173 | dev_err(&dev->dev, "invalid DMA transfer type %d\n", transfer); |
173 | } | 174 | } |
174 | 175 | ||
175 | return flags; | 176 | return flags; |
@@ -336,7 +337,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, | |||
336 | case ACPI_RESOURCE_TYPE_DMA: | 337 | case ACPI_RESOURCE_TYPE_DMA: |
337 | dma = &res->data.dma; | 338 | dma = &res->data.dma; |
338 | if (dma->channel_count > 0 && dma->channels[0] != (u8) -1) | 339 | if (dma->channel_count > 0 && dma->channels[0] != (u8) -1) |
339 | flags = dma_flags(dma->type, dma->bus_master, | 340 | flags = dma_flags(dev, dma->type, dma->bus_master, |
340 | dma->transfer); | 341 | dma->transfer); |
341 | else | 342 | else |
342 | flags = IORESOURCE_DISABLED; | 343 | flags = IORESOURCE_DISABLED; |
@@ -477,7 +478,7 @@ static __init void pnpacpi_parse_dma_option(struct pnp_dev *dev, | |||
477 | for (i = 0; i < p->channel_count; i++) | 478 | for (i = 0; i < p->channel_count; i++) |
478 | map |= 1 << p->channels[i]; | 479 | map |= 1 << p->channels[i]; |
479 | 480 | ||
480 | flags = dma_flags(p->type, p->bus_master, p->transfer); | 481 | flags = dma_flags(dev, p->type, p->bus_master, p->transfer); |
481 | pnp_register_dma_resource(dev, option_flags, map, flags); | 482 | pnp_register_dma_resource(dev, option_flags, map, flags); |
482 | } | 483 | } |
483 | 484 | ||
@@ -608,8 +609,8 @@ static __init void pnpacpi_parse_address_option(struct pnp_dev *dev, | |||
608 | unsigned char flags = 0; | 609 | unsigned char flags = 0; |
609 | 610 | ||
610 | status = acpi_resource_to_address64(r, p); | 611 | status = acpi_resource_to_address64(r, p); |
611 | if (!ACPI_SUCCESS(status)) { | 612 | if (ACPI_FAILURE(status)) { |
612 | pnp_warn("PnPACPI: failed to convert resource type %d", | 613 | dev_warn(&dev->dev, "can't convert resource type %d\n", |
613 | r->type); | 614 | r->type); |
614 | return; | 615 | return; |
615 | } | 616 | } |