mtd/drivers/mtd/maps map_funcs.c,1.4,1.5
Nicolas Pitre
nico at infradead.org
Thu Jun 3 00:10:24 EDT 2004
Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv24269/drivers/mtd/maps
Modified Files:
map_funcs.c
Log Message:
default cached access for map drivers.
Index: map_funcs.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/map_funcs.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- map_funcs.c 2 Apr 2004 01:25:23 -0000 1.4
+++ map_funcs.c 3 Jun 2004 04:10:22 -0000 1.5
@@ -69,7 +69,10 @@
static void simple_map_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
{
- memcpy_fromio(to, map->virt + from, len);
+ if (map->cached)
+ memcpy(to, (char *)map->cached + from, len);
+ else
+ memcpy_fromio(to, map->virt + from, len);
}
static void simple_map_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
More information about the linux-mtd-cvs
mailing list