diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-04-29 02:34:35 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-29 11:22:28 +0400 |
commit | dc16f5f2ede8cc2acf8ac22857a7fecf3a4296c2 (patch) | |
tree | b4ba965b7c5e1e6011697160aa5346b63afbbbf9 /drivers/pnp/isapnp | |
parent | dbddd0383c59d588f8db5e773b062756e39117ec (diff) | |
download | linux-dc16f5f2ede8cc2acf8ac22857a7fecf3a4296c2.tar.xz |
PNP: make generic pnp_add_dma_resource()
Add a pnp_add_dma_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 | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index 2cf750f077a4..2e5e58c777dd 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -973,12 +973,9 @@ static int isapnp_read_resources(struct pnp_dev *dev) ret = isapnp_read_byte(ISAPNP_CFG_DMA + tmp); if (ret == 4) continue; - pnp_res = pnp_get_pnp_resource(dev, IORESOURCE_DMA, - tmp); - pnp_res->index = tmp; - res = &pnp_res->res; - res->start = res->end = ret; - res->flags = IORESOURCE_DMA; + pnp_res = pnp_add_dma_resource(dev, ret, 0); + if (pnp_res) + pnp_res->index = tmp; } } return 0; |