[PATCH 1/7] generic_memmap_ro/rw: switch to resource
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Jul 29 01:52:51 EDT 2011
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
drivers/base/driver.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index b5166c8..3efb538 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -263,7 +263,7 @@ int generic_memmap_ro(struct cdev *cdev, void **map, int flags)
if (flags & PROT_WRITE)
return -EACCES;
- *map = (void *)cdev->dev->map_base;
+ *map = dev_get_mem_region(cdev->dev, 0);
return 0;
}
@@ -272,7 +272,8 @@ int generic_memmap_rw(struct cdev *cdev, void **map, int flags)
if (!cdev->dev)
return -EINVAL;
- *map = (void *)cdev->dev->map_base;
+ *map = dev_get_mem_region(cdev->dev, 0);
+ return 0;
return 0;
}
--
1.7.5.4
More information about the barebox
mailing list