[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4813AC7D.9000006@keyaccess.nl>
Date: Sun, 27 Apr 2008 00:28:13 +0200
From: Rene Herman <rene.herman@...access.nl>
To: Bjorn Helgaas <bjorn.helgaas@...com>
CC: Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, Adam Belay <ambx1@....rr.com>,
Adam M Belay <abelay@....edu>,
Li Shaohua <shaohua.li@...el.com>,
Matthieu Castet <castet.matthieu@...e.fr>,
Thomas Renninger <trenn@...e.de>,
Jaroslav Kysela <perex@...ex.cz>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch 41/54] PNP: remove pnp_resource_table references from
resource decoders
On 25-04-08 20:38, Bjorn Helgaas wrote:
> Index: work10/drivers/pnp/pnpacpi/rsparser.c
> ===================================================================
> --- work10.orig/drivers/pnp/pnpacpi/rsparser.c 2008-04-25 11:15:08.000000000 -0600
> +++ work10/drivers/pnp/pnpacpi/rsparser.c 2008-04-25 11:15:09.000000000 -0600
> @@ -82,8 +82,8 @@
> u32 gsi, int triggering,
> int polarity, int shareable)
> {
> - struct pnp_resource_table *res = dev->res;
> - int i = 0;
> + struct resource *res;
> + int i;
> int irq;
> int p, t;
> static unsigned char warned;
> @@ -91,9 +91,11 @@
> if (!valid_IRQ(gsi))
> return;
>
> - while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) &&
> - i < PNP_MAX_IRQ)
> - i++;
> + for (i = 0; i < PNP_MAX_IRQ; i++) {
> + res = &dev->res->irq_resource[i];
> + if (res->flags & IORESOURCE_UNSET)
> + break;
> + }
Another possible user of pnp_resource_valid.
> + for (i = 0; i < PNP_MAX_DMA; i++) {
> + res = &dev->res->dma_resource[i];
> + if (res->flags & IORESOURCE_UNSET)
> + break;
> + }
.
> + for (i = 0; i < PNP_MAX_PORT; i++) {
> + res = &dev->res->port_resource[i];
> + if (res->flags & IORESOURCE_UNSET)
> + break;
> + }
.
> + for (i = 0; i < PNP_MAX_MEM; i++) {
> + res = &dev->res->mem_resource[i];
> + if (res->flags & IORESOURCE_UNSET)
> + break;
> + }
.
> Index: work10/drivers/pnp/pnpbios/rsparser.c
> ===================================================================
> --- work10.orig/drivers/pnp/pnpbios/rsparser.c 2008-04-25 11:15:08.000000000 -0600
> +++ work10/drivers/pnp/pnpbios/rsparser.c 2008-04-25 11:15:09.000000000 -0600
> @@ -56,80 +56,90 @@
>
> static void pnpbios_parse_allocated_irqresource(struct pnp_dev *dev, int irq)
> {
> - struct pnp_resource_table *res = dev->res;
> - int i = 0;
> + struct resource *res;
> + int i;
> +
> + for (i = 0; i < PNP_MAX_IRQ; i++) {
> + res = &dev->res->irq_resource[i];
> + if (res->flags & IORESOURCE_UNSET)
> + break;
> + }
.
> + for (i = 0; i < PNP_MAX_DMA; i++) {
> + res = &dev->res->dma_resource[i];
> + if (res->flags & IORESOURCE_UNSET)
> + break;
> + }
.
> + for (i = 0; i < PNP_MAX_PORT; i++) {
> + res = &dev->res->port_resource[i];
> + if (res->flags & IORESOURCE_UNSET)
> + break;
> + }
.
> + for (i = 0; i < PNP_MAX_MEM; i++) {
> + res = &dev->res->mem_resource[i];
> + if (res->flags & IORESOURCE_UNSET)
> + break;
> + }
.
Rene
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists