summaryrefslogtreecommitdiff
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 16:34:34 -0600
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:28 -0400
commitdbddd0383c59d588f8db5e773b062756e39117ec (patch)
tree77009fb218b4fc21090ae83105aa0f84664ae61c /drivers/pnp/isapnp
parenta50b6d7b8d7e1a8b13bd1be65a865b115e1190d9 (diff)
downloadlinux-3.10-dbddd0383c59d588f8db5e773b062756e39117ec.tar.gz
linux-3.10-dbddd0383c59d588f8db5e773b062756e39117ec.tar.bz2
linux-3.10-dbddd0383c59d588f8db5e773b062756e39117ec.zip
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>
Diffstat (limited to 'drivers/pnp/isapnp')
-rw-r--r--drivers/pnp/isapnp/core.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index f949a538ccd..2cf750f077a 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -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);