lkml.org 
[lkml]   [2012]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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@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


\
 
 \ /
  Last update: 2012-05-29 12:41    [W:0.097 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site