diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/manager.c | 2 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 4 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/rsparser.c | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index 639e04253482..65ecef738537 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c @@ -253,7 +253,7 @@ void pnp_init_resource_table(struct pnp_resource_table *table) /** * pnp_clean_resources - clears resources that were not manually set - * @res - the resources to clean + * @res: the resources to clean * */ static void pnp_clean_resource_table(struct pnp_resource_table * res) diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index c0ddb1eb8c4d..dd61e09029b1 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c @@ -94,8 +94,8 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma) { int i = 0; - while (!(res->dma_resource[i].flags & IORESOURCE_UNSET) && - i < PNP_MAX_DMA) + while (i < PNP_MAX_DMA && + !(res->dma_resource[i].flags & IORESOURCE_UNSET)) i++; if (i < PNP_MAX_DMA) { res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index 618ac15a9e90..79bce7b75740 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c @@ -72,7 +72,9 @@ static void pnpbios_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma) { int i = 0; - while (!(res->dma_resource[i].flags & IORESOURCE_UNSET) && i < PNP_MAX_DMA) i++; + while (i < PNP_MAX_DMA && + !(res->dma_resource[i].flags & IORESOURCE_UNSET)) + i++; if (i < PNP_MAX_DMA) { res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag if (dma == -1) { |