summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/mtdram.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/mtdram.c')
-rw-r--r--drivers/mtd/devices/mtdram.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
index fbcccd0398..acaf002258 100644
--- a/drivers/mtd/devices/mtdram.c
+++ b/drivers/mtd/devices/mtdram.c
@@ -49,6 +49,7 @@ static int ram_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retle
static int mtdram_probe(struct device_d *dev)
{
+ struct resource *iores;
void __iomem *base;
int device_id;
struct mtd_info *mtd;
@@ -70,11 +71,12 @@ static int mtdram_probe(struct device_d *dev)
mtd->name = "mtdram";
}
- base = dev_request_mem_region(dev, 0);
- if (IS_ERR(base)) {
- ret = PTR_ERR(base);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores)) {
+ ret = PTR_ERR(iores);
goto nobase;
}
+ base = IOMEM(iores->start);
res = dev_get_resource(dev, IORESOURCE_MEM, 0);
size = (unsigned long) resource_size(res);