Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760935AbZFZRDa (ORCPT ); Fri, 26 Jun 2009 13:03:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760785AbZFZRDK (ORCPT ); Fri, 26 Jun 2009 13:03:10 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:32796 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760758AbZFZRDJ (ORCPT ); Fri, 26 Jun 2009 13:03:09 -0400 Message-ID: <57946.192.168.10.89.1246035773.squirrel@dbdmail.itg.ti.com> In-Reply-To: <53729.192.168.10.89.1246035472.squirrel@dbdmail.itg.ti.com> References: <53729.192.168.10.89.1246035472.squirrel@dbdmail.itg.ti.com> Date: Fri, 26 Jun 2009 22:32:53 +0530 (IST) Subject: Re: [PATCH][MTD][NAND]: fix omap2.c compile failure and warning From: "vimal singh" To: "vimal singh" Cc: "David Woodhouse" , "tom.leiming@gmail.com" , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "david-b@pacbell.net" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Priority: 3 (Normal) Importance: Normal Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1905 Lines: 60 Somehow I do not see below errors on compilation: drivers/mtd/nand/omap2.c: In function 'omap_wait': drivers/mtd/nand/omap2.c:543: error: 'jiffies' undeclared (first use in this function) drivers/mtd/nand/omap2.c:543: error: (Each undeclared identifier is reported only once drivers/mtd/nand/omap2.c:543: error: for each function it appears in.) drivers/mtd/nand/omap2.c:557: error: implicit declaration of function 'time_before' But still including 'linux/jiffies.h'. Below is the patch. Signed-off-by: Vimal Singh Signed-off-by: Ming Lei --- drivers/mtd/nand/omap2.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 0cd76f8..3b6e6ad 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include #include @@ -541,7 +543,7 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip) struct omap_nand_info *info = container_of(mtd, struct omap_nand_info, mtd); unsigned long timeo = jiffies; - int status, state = this->state; + int status = NAND_STATUS_FAIL, state = this->state; if (state == FL_ERASING) timeo += (HZ * 400) / 1000; @@ -558,6 +560,7 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip) status = __raw_readb(this->IO_ADDR_R); if (!(status & 0x40)) break; + cond_resched(); } return status; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/