summaryrefslogtreecommitdiffstats
path: root/commands/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/mem.c')
-rw-r--r--commands/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/mem.c b/commands/mem.c
index 080bfdef3f..6d1a2b8e8a 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -594,7 +594,7 @@ static int mem_probe(struct device_d *dev)
dev->priv = cdev;
cdev->name = (char*)dev->resource[0].name;
- cdev->size = (unsigned long)dev->resource[0].size;
+ cdev->size = (unsigned long)resource_size(&dev->resource[0]);
cdev->ops = &memops;
cdev->dev = dev;