Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3239a6cd authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse
Browse files

mtd: nand: use NAND_HAS_CACHEPROG



We have this unused macro, let's use it and justify its existence.

Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 88ad4b16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2059,7 +2059,7 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
	 */
	cached = 0;

	if (!cached || !(chip->options & NAND_CACHEPRG)) {
	if (!cached || !NAND_HAS_CACHEPROG(chip)) {

		chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
		status = chip->waitfunc(mtd, chip);
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ typedef enum {
#define NAND_SUBPAGE_READ	0x00001000

/* Options valid for Samsung large page devices */
#define NAND_SAMSUNG_LP_OPTIONS (NAND_CACHEPRG)
#define NAND_SAMSUNG_LP_OPTIONS NAND_CACHEPRG

/* Macros to identify the above */
#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))