aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-06-09 19:08:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 08:47:49 -0700
commit41318b9db0e59e0ffc6e627251c8640d3307fc0f (patch)
tree45f43764dcc624da9e3b6b7711b7cc1369752358 /drivers/mtd
parenta2f2aa2f0c648d1dc22cf9ef4990cfc0b721add8 (diff)
downloadkernel_samsung_smdk4412-41318b9db0e59e0ffc6e627251c8640d3307fc0f.zip
kernel_samsung_smdk4412-41318b9db0e59e0ffc6e627251c8640d3307fc0f.tar.gz
kernel_samsung_smdk4412-41318b9db0e59e0ffc6e627251c8640d3307fc0f.tar.bz2
mtd: cafe_nand: fix an & vs | mistake
commit 48f8b641297df49021093763a3271119a84990a2 upstream. The intent here was clearly to set result to true if the 0x40000000 flag was set. But instead there was a | vs & typo and we always set result to true. Artem: check the spec at wiki.laptop.org/images/5/5c/88ALP01_Datasheet_July_2007.pdf and this fix looks correct. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/cafe_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
index 87ebb4e..f5cdc56 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -102,7 +102,7 @@ static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
static int cafe_device_ready(struct mtd_info *mtd)
{
struct cafe_priv *cafe = mtd->priv;
- int result = !!(cafe_readl(cafe, NAND_STATUS) | 0x40000000);
+ int result = !!(cafe_readl(cafe, NAND_STATUS) & 0x40000000);
uint32_t irqs = cafe_readl(cafe, NAND_IRQ);
cafe_writel(cafe, irqs, NAND_IRQ);