diff options
Diffstat (limited to 'drivers/mtd/devices/slram.c')
-rw-r--r-- | drivers/mtd/devices/slram.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c index d293add1857c..cb86db746f28 100644 --- a/drivers/mtd/devices/slram.c +++ b/drivers/mtd/devices/slram.c | |||
@@ -76,8 +76,9 @@ static char *map; | |||
76 | static slram_mtd_list_t *slram_mtdlist = NULL; | 76 | static slram_mtd_list_t *slram_mtdlist = NULL; |
77 | 77 | ||
78 | static int slram_erase(struct mtd_info *, struct erase_info *); | 78 | static int slram_erase(struct mtd_info *, struct erase_info *); |
79 | static int slram_point(struct mtd_info *, loff_t, size_t, size_t *, u_char **); | 79 | static int slram_point(struct mtd_info *, loff_t, size_t, size_t *, void **, |
80 | static void slram_unpoint(struct mtd_info *, u_char *, loff_t, size_t); | 80 | resource_size_t *); |
81 | static void slram_unpoint(struct mtd_info *, loff_t, size_t); | ||
81 | static int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); | 82 | static int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); |
82 | static int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); | 83 | static int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); |
83 | 84 | ||
@@ -104,19 +105,23 @@ static int slram_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
104 | } | 105 | } |
105 | 106 | ||
106 | static int slram_point(struct mtd_info *mtd, loff_t from, size_t len, | 107 | static int slram_point(struct mtd_info *mtd, loff_t from, size_t len, |
107 | size_t *retlen, u_char **mtdbuf) | 108 | size_t *retlen, void **virt, resource_size_t *phys) |
108 | { | 109 | { |
109 | slram_priv_t *priv = mtd->priv; | 110 | slram_priv_t *priv = mtd->priv; |
110 | 111 | ||
112 | /* can we return a physical address with this driver? */ | ||
113 | if (phys) | ||
114 | return -EINVAL; | ||
115 | |||
111 | if (from + len > mtd->size) | 116 | if (from + len > mtd->size) |
112 | return -EINVAL; | 117 | return -EINVAL; |
113 | 118 | ||
114 | *mtdbuf = priv->start + from; | 119 | *virt = priv->start + from; |
115 | *retlen = len; | 120 | *retlen = len; |
116 | return(0); | 121 | return(0); |
117 | } | 122 | } |
118 | 123 | ||
119 | static void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) | 124 | static void slram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) |
120 | { | 125 | { |
121 | } | 126 | } |
122 | 127 | ||