Re: [patch 3/8] PNP: remove pnp_resource.index

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

 



On Monday 19 May 2008 04:01:32 pm Rene Herman wrote:
> On 06-05-08 00:36, Bjorn Helgaas wrote:
> 
> > We used pnp_resource.index to keep track of which ISAPNP configuration
> > register a resource should be written to.  We needed this only to
> > handle the case where a register is disabled but a subsequent register
> > in the same set is enabled.
> > 
> > Rather than explicitly maintaining the pnp_resource.index, this patch
> > adds a resource every time we read an ISAPNP configuration register
> > and marks the resource as IORESOURCE_DISABLED when appropriate.  This
> > makes the position in the pnp_resource_table always correspond to the
> > config register index.
> > 
> > Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
> 
> > -			pnp_res = pnp_add_io_resource(dev, start, end,
> > -						      0);
> > -			if (pnp_res)
> > -				pnp_res->index = nport++;
> > +			pnp_add_io_resource(dev, start, end, 0);
> 
> In the tree after your v2 series, pnp_add_foo_resource() are called as 
> void functions yet still return a struct pnp_resource *. You might have 
> other plans but if not, I guess they can _be_ void functions?

You're right, I still don't do anything with the return value.  It
could be used to check for success/failure, but we currently don't
do that.  Possibly a future cleanup since there's no functional
problem here.

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