summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-29 00:34:36 +0200
committerLen Brown <len.brown@intel.com>2008-04-29 09:22:29 +0200
commitcc8c2e308194f0997c718c7c735550ff06754d20 (patch)
tree1464d278291fd285653ff026f62c5f4f6d75286c /drivers/pnp/isapnp
parentPNP: make generic pnp_add_dma_resource() (diff)
downloadlinux-cc8c2e308194f0997c718c7c735550ff06754d20.tar.xz
linux-cc8c2e308194f0997c718c7c735550ff06754d20.zip
PNP: make generic pnp_add_io_resource()
Add a pnp_add_io_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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 2e5e58c777dd..bdd8508090da 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -941,11 +941,9 @@ static int isapnp_read_resources(struct pnp_dev *dev)
ret = isapnp_read_word(ISAPNP_CFG_PORT + (tmp << 1));
if (!ret)
continue;
- pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_IO, tmp);
- pnp_res->index = tmp;
- res = &pnp_res->res;
- res->start = ret;
- res->flags = IORESOURCE_IO;
+ pnp_res = pnp_add_io_resource(dev, ret, ret, 0);
+ if (pnp_res)
+ pnp_res->index = tmp;
}
for (tmp = 0; tmp < ISAPNP_MAX_MEM; tmp++) {
ret =