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/interface.c | |
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/interface.c')
-rw-r--r-- | drivers/pnp/interface.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index e8134c286207..00c8a970a97e 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c @@ -440,16 +440,10 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr, buf += 3; while (isspace(*buf)) ++buf; - pnp_res = pnp_get_pnp_resource(dev, - IORESOURCE_DMA, ndma); - if (!pnp_res) - break; - pnp_res->index = ndma; - res = &pnp_res->res; - res->start = res->end = - simple_strtoul(buf, &buf, 0); - res->flags = IORESOURCE_DMA; - ndma++; + start = simple_strtoul(buf, &buf, 0); + pnp_res = pnp_add_dma_resource(dev, start, 0); + if (pnp_res) + pnp_res->index = ndma++; continue; } break; |