[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120529100646.GA23383@faui49q.informatik.uni-erlangen.de>
Date: Tue, 29 May 2012 12:06:46 +0200
From: Christian Dietrich <christian.dietrich@...ormatik.uni-erlangen.de>
To: Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>
Cc: David Woodhouse <dwmw2@...radead.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
Christian Dietrich
<christian.dietrich@...ormatik.uni-erlangen.de>,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
vamos-dev@...ts.cs.fau.de
Subject: [PATCH] mtd: dc21285.c: remove double check of CONFIG_ARCH_NETWINDER
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@...ormatik.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists