From: Frederik Deweerdt Date: Mon, 2 Oct 2006 08:42:25 +0000 (+0100) Subject: [MTD] fix nftl_write warning X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=553a8012088b3452c7d66ff60d2d06ad0c9bea00;p=linux-beck.git [MTD] fix nftl_write warning 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 Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c index dd5cea8b4a7a..b5a5f8da4722 100644 --- a/drivers/mtd/nftlcore.c +++ b/drivers/mtd/nftlcore.c @@ -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 */ @@ -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