diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-04-28 16:34:37 -0600 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-29 03:22:29 -0400 |
commit | d6180f36617953990bf90d4c1ff85b77e9995cd1 (patch) | |
tree | a9fa336f7cb1f99a62c859926c6cbcfb53f5b81e /drivers/pnp/isapnp | |
parent | cc8c2e308194f0997c718c7c735550ff06754d20 (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.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index bdd8508090d..f08399497e4 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -932,7 +932,6 @@ EXPORT_SYMBOL(isapnp_write_byte); static int isapnp_read_resources(struct pnp_dev *dev) { struct pnp_resource *pnp_res; - struct resource *res; int tmp, ret; dev->active = isapnp_read_byte(ISAPNP_CFG_ACTIVATE); @@ -950,12 +949,9 @@ static int isapnp_read_resources(struct pnp_dev *dev) isapnp_read_word(ISAPNP_CFG_MEM + (tmp << 3)) << 8; if (!ret) continue; - pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_MEM, - tmp); - pnp_res->index = tmp; - res = &pnp_res->res; - res->start = ret; - res->flags = IORESOURCE_MEM; + pnp_res = pnp_add_mem_resource(dev, ret, ret, 0); + if (pnp_res) + pnp_res->index = tmp; } for (tmp = 0; tmp < ISAPNP_MAX_IRQ; tmp++) { ret = |