aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 18:34:37 -0400
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:29 -0400
commitd6180f36617953990bf90d4c1ff85b77e9995cd1 (patch)
treea9fa336f7cb1f99a62c859926c6cbcfb53f5b81e /drivers/pnp/isapnp
parentcc8c2e308194f0997c718c7c735550ff06754d20 (diff)
PNP: make generic pnp_add_mem_resource()
Add a pnp_add_mem_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.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index bdd8508090da..f08399497e4c 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -932,7 +932,6 @@ EXPORT_SYMBOL(isapnp_write_byte);
932static int isapnp_read_resources(struct pnp_dev *dev) 932static int isapnp_read_resources(struct pnp_dev *dev)
933{ 933{
934 struct pnp_resource *pnp_res; 934 struct pnp_resource *pnp_res;
935 struct resource *res;
936 int tmp, ret; 935 int tmp, ret;
937 936
938 dev->active = isapnp_read_byte(ISAPNP_CFG_ACTIVATE); 937 dev->active = isapnp_read_byte(ISAPNP_CFG_ACTIVATE);
@@ -950,12 +949,9 @@ static int isapnp_read_resources(struct pnp_dev *dev)
950 isapnp_read_word(ISAPNP_CFG_MEM + (tmp << 3)) << 8; 949 isapnp_read_word(ISAPNP_CFG_MEM + (tmp << 3)) << 8;
951 if (!ret) 950 if (!ret)
952 continue; 951 continue;
953 pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_MEM, 952 pnp_res = pnp_add_mem_resource(dev, ret, ret, 0);
954 tmp); 953 if (pnp_res)
955 pnp_res->index = tmp; 954 pnp_res->index = tmp;
956 res = &pnp_res->res;
957 res->start = ret;
958 res->flags = IORESOURCE_MEM;
959 } 955 }
960 for (tmp = 0; tmp < ISAPNP_MAX_IRQ; tmp++) { 956 for (tmp = 0; tmp < ISAPNP_MAX_IRQ; tmp++) {
961 ret = 957 ret =