From a6c9aa1f92dd16a0ec6faeff37069db61d3f7cf3 Mon Sep 17 00:00:00 2001 From: Ben Gardiner Date: Tue, 24 May 2011 10:18:35 -0400 Subject: nand_util: convert nand_write_skip_bad() to flags In a future commit the behaviour of nand_write_skip_bad() will be further extended. Convert the only flag currently passed to the nand_write_ skip_bad() function to a bitfield of only one allocated member. This should avoid an explosion of int's at the end of the parameter list or the ambiguous calls like nand_write_skip_bad(info, offset, len, buf, 0, 1, 1); nand_write_skip_bad(info, offset, len, buf, 0, 1, 0); Instead there will be: nand_write_skip_bad(info, offset, len, buf, WITH_YAFFS_OOB | WITH_OTHER); Signed-off-by: Ben Gardiner Acked-by: Detlev Zundel Signed-off-by: Scott Wood --- include/nand.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/nand.h') diff --git a/include/nand.h b/include/nand.h index 7459bd0330..b0a31b8f02 100644 --- a/include/nand.h +++ b/include/nand.h @@ -114,8 +114,11 @@ typedef struct nand_erase_options nand_erase_options_t; int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length, u_char *buffer); + +#define WITH_YAFFS_OOB (1 << 0) /* whether write with yaffs format */ + int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length, - u_char *buffer, int withoob); + u_char *buffer, int flags); int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts); #define NAND_LOCK_STATUS_TIGHT 0x01 -- cgit v1.2.3