diff options
Diffstat (limited to 'drivers/pnp')
-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 | } |