Skip to content

Commit

Permalink
[MTD] fix nftl_write warning
Browse files Browse the repository at this point in the history
Building 2.6.18-mm2 issues the following warning if CONFIG_NFTL_RW is not set:

  CC [M]  drivers/mtd/nftlcore.o
drivers/mtd/nftlcore.c:183: warning: 'nftl_write' defined but not used
The following patch only compiles nftl_write if CONFIG_NFTL_RW is set.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Frederik Deweerdt authored and David Woodhouse committed Oct 2, 2006
1 parent 9a29230 commit 553a801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/nftlcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
return res;
}

#ifdef CONFIG_NFTL_RW

/*
* Write data and oob to flash
*/
Expand All @@ -196,8 +198,6 @@ static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
return res;
}

#ifdef CONFIG_NFTL_RW

/* Actual NFTL access routines */
/* NFTL_findfreeblock: Find a free Erase Unit on the NFTL partition. This function is used
* when the give Virtual Unit Chain
Expand Down

0 comments on commit 553a801

Please sign in to comment.