mtd: cfi_probe: use P_ID_* definitions instead of hardcoded values
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu May 13 21:59:02 EDT 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=58598861227877bb481b9035d2a07283577a2274
Commit: 58598861227877bb481b9035d2a07283577a2274
Parent: 54b93a49d8dd90dfb658f21a3316527fe6195106
Author: Guillaume LECERF <glecerf at gmail.com>
AuthorDate: Sat Apr 24 17:58:07 2010 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri May 14 01:08:19 2010 +0100
mtd: cfi_probe: use P_ID_* definitions instead of hardcoded values
Use P_ID_* definitions already in include/linux/mtd/cfi.h instead of the
hardcoded values. Make the code more readable.
Signed-off-by: Guillaume LECERF <glecerf at gmail.com>
Reviewed-by: Wolfram Sang <w.sang at pengutronix.de>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/chips/gen_probe.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
index fcc1bc0..1d56887 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -241,17 +241,17 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary)
/* We need these for the !CONFIG_MODULES case,
because symbol_get() doesn't work there */
#ifdef CONFIG_MTD_CFI_INTELEXT
- case 0x0001:
- case 0x0003:
- case 0x0200:
+ case P_ID_INTEL_EXT:
+ case P_ID_INTEL_STD:
+ case P_ID_INTEL_PERFORMANCE:
return cfi_cmdset_0001(map, primary);
#endif
#ifdef CONFIG_MTD_CFI_AMDSTD
- case 0x0002:
+ case P_ID_AMD_STD:
return cfi_cmdset_0002(map, primary);
#endif
#ifdef CONFIG_MTD_CFI_STAA
- case 0x0020:
+ case P_ID_ST_ADV:
return cfi_cmdset_0020(map, primary);
#endif
default:
More information about the linux-mtd-cvs
mailing list