summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 16:34:36 -0600
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:29 -0400
commitcc8c2e308194f0997c718c7c735550ff06754d20 (patch)
tree1464d278291fd285653ff026f62c5f4f6d75286c /drivers/pnp/isapnp
parentdc16f5f2ede8cc2acf8ac22857a7fecf3a4296c2 (diff)
downloadlinux-cc8c2e308194f0997c718c7c735550ff06754d20.tar.gz
linux-cc8c2e308194f0997c718c7c735550ff06754d20.tar.bz2
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 =