From 6862523ccbf5daf90337d3fbb6f5609fd93dcd8e Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 18 Dec 2015 05:55:24 +0000 Subject: No need to test command values this way. There can be only one, even though the encoding is bit-wise today... --- sys/dev/nand/nand_cdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/nand/nand_cdev.c') diff --git a/sys/dev/nand/nand_cdev.c b/sys/dev/nand/nand_cdev.c index b011946..0540955 100644 --- a/sys/dev/nand/nand_cdev.c +++ b/sys/dev/nand/nand_cdev.c @@ -236,10 +236,10 @@ nand_strategy(struct bio *bp) chip = dev->si_drv1; nand_debug(NDBG_CDEV, "Strategy %s on chip %d [%p]\n", - (bp->bio_cmd & BIO_READ) == BIO_READ ? "READ" : "WRITE", + bp->bio_cmd == BIO_READ ? "READ" : "WRITE", chip->num, chip); - if ((bp->bio_cmd & BIO_READ) == BIO_READ) { + if (bp->bio_cmd == BIO_READ) { err = nand_read(chip, bp->bio_offset & 0xffffffff, bp->bio_data, bp->bio_bcount); -- cgit v1.1