PNP: make generic pnp_add_irq_resource()

Add a pnp_add_irq_resource() that can be used by all the PNP
backends.  This consolidates a little more pnp_resource_table
knowledge into one place.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Bjorn Helgaas
2008-04-28 16:34:34 -06:00
committed by Len Brown
parent a50b6d7b8d
commit dbddd0383c
6 changed files with 51 additions and 66 deletions

View File

@ -965,12 +965,9 @@ static int isapnp_read_resources(struct pnp_dev *dev)
8);
if (!ret)
continue;
pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_IRQ,
tmp);
pnp_res->index = tmp;
res = &pnp_res->res;
res->start = res->end = ret;
res->flags = IORESOURCE_IRQ;
pnp_res = pnp_add_irq_resource(dev, ret, 0);
if (pnp_res)
pnp_res->index = tmp;
}
for (tmp = 0; tmp < ISAPNP_MAX_DMA; tmp++) {
ret = isapnp_read_byte(ISAPNP_CFG_DMA + tmp);