From: Bjorn Helgaas Date: Mon, 28 Apr 2008 22:34:01 +0000 (-0600) Subject: PNPACPI: hoist dma_flags() out of pnpacpi_parse_allocated_dmaresource() X-Git-Tag: v2.6.26-rc1~101^2^2~41 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb84b41d1a1e3ad1ebe7f91a7c97d3b6ca242e9d;p=linux-2.6 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 Acked-By: Rene Herman Signed-off-by: Len Brown --- diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 37708fdefe..2a47e977d8 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) } static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, - u32 dma, int type, - int bus_master, int transfer) + u32 dma, int flags) { int i = 0; static unsigned char warned; @@ -180,8 +179,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, i++; if (i < PNP_MAX_DMA) { res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag - res->dma_resource[i].flags |= - dma_flags(type, bus_master, transfer); + res->dma_resource[i].flags |= flags; if (dma == -1) { res->dma_resource[i].flags |= IORESOURCE_DISABLED; return; @@ -311,9 +309,8 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, if (dma->channel_count > 0) pnpacpi_parse_allocated_dmaresource(res_table, dma->channels[0], - dma->type, - dma->bus_master, - dma->transfer); + dma_flags(dma->type, dma->bus_master, + dma->transfer)); break; case ACPI_RESOURCE_TYPE_IO: