mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
dbddd0383c
commit
dc16f5f2ed
6 changed files with 47 additions and 72 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue