aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/phram.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/phram.c')
-rw-r--r--drivers/mtd/devices/phram.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 5f960182da95..c7987b1c5e01 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -57,20 +57,21 @@ static int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
57} 57}
58 58
59static int phram_point(struct mtd_info *mtd, loff_t from, size_t len, 59static int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
60 size_t *retlen, u_char **mtdbuf) 60 size_t *retlen, void **virt, resource_size_t *phys)
61{ 61{
62 u_char *start = mtd->priv;
63
64 if (from + len > mtd->size) 62 if (from + len > mtd->size)
65 return -EINVAL; 63 return -EINVAL;
66 64
67 *mtdbuf = start + from; 65 /* can we return a physical address with this driver? */
66 if (phys)
67 return -EINVAL;
68
69 *virt = mtd->priv + from;
68 *retlen = len; 70 *retlen = len;
69 return 0; 71 return 0;
70} 72}
71 73
72static void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, 74static void phram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
73 size_t len)
74{ 75{
75} 76}
76 77