[MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function.

The patch ensures that the current code (kernel 2.6.22) uses the bits
like the code prior to the refactoring. The variable "bits" is employed
in a useful way now.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>

authored by Roland Stigge and committed by David Woodhouse 9d7b4b55 47af05dd

+5 -5
+5 -5
drivers/mtd/nand/edb7312.c
··· 74 /* 75 * hardware specific access to control-lines 76 * 77 - * NAND_NCE: bit 0 -> bit 7 78 * NAND_CLE: bit 1 -> bit 4 79 * NAND_ALE: bit 2 -> bit 5 80 */ ··· 83 struct nand_chip *chip = mtd->priv; 84 85 if (ctrl & NAND_CTRL_CHANGE) { 86 - unsigned char bits; 87 88 - bits = (ctrl & (NAND_CLE | NAND_ALE)) << 3; 89 - bits = (ctrl & NAND_NCE) << 7; 90 91 - clps_writeb((clps_readb(ep7312_pxdr) & 0xB0) | 0x10, 92 ep7312_pxdr); 93 } 94 if (cmd != NAND_CMD_NONE)
··· 74 /* 75 * hardware specific access to control-lines 76 * 77 + * NAND_NCE: bit 0 -> bit 6 (bit 7 = 1) 78 * NAND_CLE: bit 1 -> bit 4 79 * NAND_ALE: bit 2 -> bit 5 80 */ ··· 83 struct nand_chip *chip = mtd->priv; 84 85 if (ctrl & NAND_CTRL_CHANGE) { 86 + unsigned char bits = 0x80; 87 88 + bits |= (ctrl & (NAND_CLE | NAND_ALE)) << 3; 89 + bits |= (ctrl & NAND_NCE) ? 0x00 : 0x40; 90 91 + clps_writeb((clps_readb(ep7312_pxdr) & 0xF0) | bits, 92 ep7312_pxdr); 93 } 94 if (cmd != NAND_CMD_NONE)