Skip to content

Commit

Permalink
mtd: nand: use NAND_HAS_CACHEPROG
Browse files Browse the repository at this point in the history
We have this unused macro, let's use it and justify its existence.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Apr 5, 2013
1 parent 88ad4b1 commit 3239a6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/mtd/nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 3239a6c

Please sign in to comment.