aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 18:34:01 -0400
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:18 -0400
commitbb84b41d1a1e3ad1ebe7f91a7c97d3b6ca242e9d (patch)
tree5d179c244e8c4284d2a9fefdd55b3311320799b3 /drivers
parent9570a20e9da282721afc6885dbeaa1b9c1e7ff4d (diff)
PNPACPI: hoist dma_flags() out of pnpacpi_parse_allocated_dmaresource()
Hoist dma_flags() out of pnpacpi_parse_allocated_dmaresource() into its caller. This makes pnpacpi_parse_allocated_dmaresource() more similar to pnpbios_parse_allocated_dmaresource(). 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')
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 37708fdefe09..2a47e977d8a8 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -169,8 +169,7 @@ static int dma_flags(int type, int bus_master, int transfer)
169} 169}
170 170
171static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, 171static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res,
172 u32 dma, int type, 172 u32 dma, int flags)
173 int bus_master, int transfer)
174{ 173{
175 int i = 0; 174 int i = 0;
176 static unsigned char warned; 175 static unsigned char warned;
@@ -180,8 +179,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res,
180 i++; 179 i++;
181 if (i < PNP_MAX_DMA) { 180 if (i < PNP_MAX_DMA) {
182 res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag 181 res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag
183 res->dma_resource[i].flags |= 182 res->dma_resource[i].flags |= flags;
184 dma_flags(type, bus_master, transfer);
185 if (dma == -1) { 183 if (dma == -1) {
186 res->dma_resource[i].flags |= IORESOURCE_DISABLED; 184 res->dma_resource[i].flags |= IORESOURCE_DISABLED;
187 return; 185 return;
@@ -311,9 +309,8 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
311 if (dma->channel_count > 0) 309 if (dma->channel_count > 0)
312 pnpacpi_parse_allocated_dmaresource(res_table, 310 pnpacpi_parse_allocated_dmaresource(res_table,
313 dma->channels[0], 311 dma->channels[0],
314 dma->type, 312 dma_flags(dma->type, dma->bus_master,
315 dma->bus_master, 313 dma->transfer));
316 dma->transfer);
317 break; 314 break;
318 315
319 case ACPI_RESOURCE_TYPE_IO: 316 case ACPI_RESOURCE_TYPE_IO: