From 90833fdab89da02fc0276224167f0a42e5176f41 Mon Sep 17 00:00:00 2001 From: Jared Hulbert Date: Wed, 22 Aug 2007 17:38:25 +0100 Subject: [ARM] 4554/1: replace consistent_sync() with flush_ioremap_region() This fixes a regression from around 2.6.18, consistent_sync() will now BUG() under these circumstances. The use of consistent_sync() was a hack, replacing it's usage here with a new function, flush_ioremap_region(). Signed-off-by: Jared Hulbert Acked-by: Pavel Pisa Signed-off-by: Russell King --- drivers/mtd/maps/lubbock-flash.c | 6 ++---- drivers/mtd/maps/mainstone-flash.c | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'drivers/mtd') diff --git a/drivers/mtd/maps/lubbock-flash.c b/drivers/mtd/maps/lubbock-flash.c index 1aa0447c5e6..e8560683b97 100644 --- a/drivers/mtd/maps/lubbock-flash.c +++ b/drivers/mtd/maps/lubbock-flash.c @@ -15,9 +15,7 @@ #include #include #include -#include -#include #include #include #include @@ -26,7 +24,7 @@ #include #include #include - +#include #define ROM_ADDR 0x00000000 #define FLASH_ADDR 0x04000000 @@ -35,7 +33,7 @@ static void lubbock_map_inval_cache(struct map_info *map, unsigned long from, ssize_t len) { - consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE); + flush_ioremap_region(map->phys, map->cached, from, len); } static struct map_info lubbock_maps[2] = { { diff --git a/drivers/mtd/maps/mainstone-flash.c b/drivers/mtd/maps/mainstone-flash.c index eaa4bbb868a..d76487d82dc 100644 --- a/drivers/mtd/maps/mainstone-flash.c +++ b/drivers/mtd/maps/mainstone-flash.c @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include @@ -26,6 +24,7 @@ #include #include #include +#include #define ROM_ADDR 0x00000000 @@ -36,7 +35,7 @@ static void mainstone_map_inval_cache(struct map_info *map, unsigned long from, ssize_t len) { - consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE); + flush_ioremap_region(map->phys, map->cached, from, len); } static struct map_info mainstone_maps[2] = { { -- cgit v1.2.3 From 48440e893d700fb8f0de95fa7d748b711d290365 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 30 Aug 2007 17:21:19 +0100 Subject: [MTD] Initialise s_flags in get_sb_mtd_aux() Initialise s_flags in get_sb_mtd_aux() from the flags parameter. Signed-off-by: David Howells Signed-off-by: David Woodhouse --- drivers/mtd/mtdsuper.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/mtd') diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c index aca33197120..9b430f20b64 100644 --- a/drivers/mtd/mtdsuper.c +++ b/drivers/mtd/mtdsuper.c @@ -70,6 +70,8 @@ static int get_sb_mtd_aux(struct file_system_type *fs_type, int flags, DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n", mtd->index, mtd->name); + sb->s_flags = flags; + ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); if (ret < 0) { up_write(&sb->s_umount); -- cgit v1.2.3