[PATCH] mtd: dc21285.c: remove double check of CONFIG_ARCH_NETWINDER
Christian Dietrich
christian.dietrich at informatik.uni-erlangen.de
Tue May 29 06:06:46 EDT 2012
When CONFIG_ARCH_NETWINDER is unset nw_en_write is a NOP. But
machine_is_netwinder() also checks for
CONFIG_ARCH_NETWINDER. Therefore in the !netwinder case the
preprocessed code is:
if (0)
do {} while(0);
Signed-off-by: Christian Dietrich <christian.dietrich at informatik.uni-erlangen.de>
---
drivers/mtd/maps/dc21285.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c
index 86598a1..38fbf23 100644
--- a/drivers/mtd/maps/dc21285.c
+++ b/drivers/mtd/maps/dc21285.c
@@ -79,8 +79,7 @@ static void dc21285_copy_from(struct map_info *map, void *to, unsigned long from
static void dc21285_write8(struct map_info *map, const map_word d, unsigned long adr)
{
- if (machine_is_netwinder())
- nw_en_write();
+ nw_en_write();
*CSR_ROMWRITEREG = adr & 3;
adr &= ~3;
*(uint8_t*)(map->virt + adr) = d.x[0];
@@ -88,8 +87,7 @@ static void dc21285_write8(struct map_info *map, const map_word d, unsigned long
static void dc21285_write16(struct map_info *map, const map_word d, unsigned long adr)
{
- if (machine_is_netwinder())
- nw_en_write();
+ nw_en_write();
*CSR_ROMWRITEREG = adr & 3;
adr &= ~3;
*(uint16_t*)(map->virt + adr) = d.x[0];
@@ -97,8 +95,7 @@ static void dc21285_write16(struct map_info *map, const map_word d, unsigned lon
static void dc21285_write32(struct map_info *map, const map_word d, unsigned long adr)
{
- if (machine_is_netwinder())
- nw_en_write();
+ nw_en_write();
*(uint32_t*)(map->virt + adr) = d.x[0];
}
--
1.7.5.4
More information about the linux-mtd
mailing list