aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 18:34:36 -0400
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:29 -0400
commitcc8c2e308194f0997c718c7c735550ff06754d20 (patch)
tree1464d278291fd285653ff026f62c5f4f6d75286c /drivers/pnp/isapnp
parentdc16f5f2ede8cc2acf8ac22857a7fecf3a4296c2 (diff)
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)
941 ret = isapnp_read_word(ISAPNP_CFG_PORT + (tmp << 1)); 941 ret = isapnp_read_word(ISAPNP_CFG_PORT + (tmp << 1));
942 if (!ret) 942 if (!ret)
943 continue; 943 continue;
944 pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_IO, tmp); 944 pnp_res = pnp_add_io_resource(dev, ret, ret, 0);
945 pnp_res->index = tmp; 945 if (pnp_res)
946 res = &pnp_res->res; 946 pnp_res->index = tmp;
947 res->start = ret;
948 res->flags = IORESOURCE_IO;
949 } 947 }
950 for (tmp = 0; tmp < ISAPNP_MAX_MEM; tmp++) { 948 for (tmp = 0; tmp < ISAPNP_MAX_MEM; tmp++) {
951 ret = 949 ret =