diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-10-20 01:15:21 +0000 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2010-12-17 14:32:11 -0600 |
commit | 0bdecd82dda4f0c60220cbd3932a3012b3611fc9 (patch) | |
tree | 5241997e5880d18220f21326a4ce3e05b4276938 /drivers/mtd | |
parent | 326a69452745352ab09fe9b11d3d2fa4e9213c1c (diff) | |
download | u-boot-imx-0bdecd82dda4f0c60220cbd3932a3012b3611fc9.zip u-boot-imx-0bdecd82dda4f0c60220cbd3932a3012b3611fc9.tar.gz u-boot-imx-0bdecd82dda4f0c60220cbd3932a3012b3611fc9.tar.bz2 |
nand: constify id/manu tables
These id tables need not be writable.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 6 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_ids.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 21cc5a3..b74d040 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2409,11 +2409,11 @@ static void nand_set_defaults(struct nand_chip *chip, int busw) /* * Get the flash and manufacturer id and lookup if the type is supported */ -static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, +static const struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, struct nand_chip *chip, int busw, int *maf_id) { - struct nand_flash_dev *type = NULL; + const struct nand_flash_dev *type = NULL; int i, dev_id, maf_idx; int tmp_id, tmp_manf; @@ -2587,7 +2587,7 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips) { int i, busw, nand_maf_id; struct nand_chip *chip = mtd->priv; - struct nand_flash_dev *type; + const struct nand_flash_dev *type; /* Get buswidth to select the correct functions */ busw = chip->options & NAND_BUSWIDTH_16; diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c index 25b22ec..8d7ea76 100644 --- a/drivers/mtd/nand/nand_ids.c +++ b/drivers/mtd/nand/nand_ids.c @@ -22,7 +22,7 @@ + 256 256 Byte page size * 512 512 Byte page size */ -struct nand_flash_dev nand_flash_ids[] = { +const struct nand_flash_dev nand_flash_ids[] = { #ifdef CONFIG_MTD_NAND_MUSEUM_IDS {"NAND 1MiB 5V 8-bit", 0x6e, 256, 1, 0x1000, 0}, @@ -132,7 +132,7 @@ struct nand_flash_dev nand_flash_ids[] = { /* * Manufacturer ID list */ -struct nand_manufacturers nand_manuf_ids[] = { +const struct nand_manufacturers nand_manuf_ids[] = { {NAND_MFR_TOSHIBA, "Toshiba"}, {NAND_MFR_SAMSUNG, "Samsung"}, {NAND_MFR_FUJITSU, "Fujitsu"}, |