diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-07-30 15:35:05 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-08-01 16:47:47 -0400 |
commit | 34a82443b79dcda4304b229d555586296da40c16 (patch) | |
tree | e375cf274b6c2eb1f41c81db3a864facfb7cce46 /drivers/mtd/mtdchar.c | |
parent | 623fa579e61f250c1913c70257ef3a753820bb68 (diff) |
[MTD] dataflash OTP support
Now that we can tell when we have one of the newer DataFlash chips,
optionally expose the 128 bytes of OTP memory they provide. Tested
on at45db642 revision B and D chips.
Switch mtdchar over to a generic HAVE_MTD_OTP flag instead of adding
another #ifdef for each type of chip whose driver has OTP support.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r-- | drivers/mtd/mtdchar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index d2f331876e4..13cc67ad272 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -350,7 +350,7 @@ static void mtdchar_erase_callback (struct erase_info *instr) | |||
350 | wake_up((wait_queue_head_t *)instr->priv); | 350 | wake_up((wait_queue_head_t *)instr->priv); |
351 | } | 351 | } |
352 | 352 | ||
353 | #if defined(CONFIG_MTD_OTP) || defined(CONFIG_MTD_ONENAND_OTP) | 353 | #ifdef CONFIG_HAVE_MTD_OTP |
354 | static int otp_select_filemode(struct mtd_file_info *mfi, int mode) | 354 | static int otp_select_filemode(struct mtd_file_info *mfi, int mode) |
355 | { | 355 | { |
356 | struct mtd_info *mtd = mfi->mtd; | 356 | struct mtd_info *mtd = mfi->mtd; |
@@ -663,7 +663,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file, | |||
663 | break; | 663 | break; |
664 | } | 664 | } |
665 | 665 | ||
666 | #if defined(CONFIG_MTD_OTP) || defined(CONFIG_MTD_ONENAND_OTP) | 666 | #ifdef CONFIG_HAVE_MTD_OTP |
667 | case OTPSELECT: | 667 | case OTPSELECT: |
668 | { | 668 | { |
669 | int mode; | 669 | int mode; |