mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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@gmail.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
54b93a49d8
commit
5859886122
1 changed files with 5 additions and 5 deletions
|
@ -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,
|
/* We need these for the !CONFIG_MODULES case,
|
||||||
because symbol_get() doesn't work there */
|
because symbol_get() doesn't work there */
|
||||||
#ifdef CONFIG_MTD_CFI_INTELEXT
|
#ifdef CONFIG_MTD_CFI_INTELEXT
|
||||||
case 0x0001:
|
case P_ID_INTEL_EXT:
|
||||||
case 0x0003:
|
case P_ID_INTEL_STD:
|
||||||
case 0x0200:
|
case P_ID_INTEL_PERFORMANCE:
|
||||||
return cfi_cmdset_0001(map, primary);
|
return cfi_cmdset_0001(map, primary);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MTD_CFI_AMDSTD
|
#ifdef CONFIG_MTD_CFI_AMDSTD
|
||||||
case 0x0002:
|
case P_ID_AMD_STD:
|
||||||
return cfi_cmdset_0002(map, primary);
|
return cfi_cmdset_0002(map, primary);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MTD_CFI_STAA
|
#ifdef CONFIG_MTD_CFI_STAA
|
||||||
case 0x0020:
|
case P_ID_ST_ADV:
|
||||||
return cfi_cmdset_0020(map, primary);
|
return cfi_cmdset_0020(map, primary);
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue