mtd/drivers/mtd/nand nand.c,1.54,1.55
David Woodhouse
dwmw2 at infradead.org
Wed Jul 16 18:34:05 EDT 2003
Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv28818
Modified Files:
nand.c
Log Message:
fix nand_select_chip
Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- nand.c 11 Jul 2003 15:11:25 -0000 1.54
+++ nand.c 16 Jul 2003 22:34:02 -0000 1.55
@@ -189,12 +189,19 @@
static void nand_select_chip(struct mtd_info *mtd, int chip)
{
struct nand_chip *this = mtd->priv;
- if (chip)
- this->hwcontrol(mtd, NAND_CTL_SETNCE);
- else
+ switch(chip) {
+ case -1:
this->hwcontrol(mtd, NAND_CTL_CLRNCE);
+ break;
+ case 0:
+ this->hwcontrol(mtd, NAND_CTL_SETNCE);
+ break;
+ default:
+ BUG();
+ }
}
+
static void nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
{
int i;
More information about the linux-mtd-cvs
mailing list