Re: [patch 41/54] PNP: remove pnp_resource_table references from resource decoders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 26 April 2008 04:28:13 pm Rene Herman wrote:
> 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.

I changed this, and also changed the array lookups to use
pnp_get_resource().  And I made similar changes in ISAPNP.

And I replaced many of these &dev->res->irq_resource[] things
with pnp_get_resource().  This change rippled through several
subsequent patches, but it's just more mechanical changes.

Bjorn

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux