]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pnp/interface.c
PNP: make generic pnp_add_dma_resource()
[linux-2.6-omap-h63xx.git] / drivers / pnp / interface.c
index e8134c2862078ba1c91a677fe8f51f9093c47caa..00c8a970a97e909e94c740cec8b4cb0b1666ab46 100644 (file)
@@ -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;