diff options
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c27ff0a9d650..18331c4a8588 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -3549,10 +3549,10 @@ static bool find_full_id_nand(struct mtd_info *mtd, struct nand_chip *chip, | |||
3549 | */ | 3549 | */ |
3550 | static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, | 3550 | static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, |
3551 | struct nand_chip *chip, | 3551 | struct nand_chip *chip, |
3552 | int busw, | ||
3553 | int *maf_id, int *dev_id, | 3552 | int *maf_id, int *dev_id, |
3554 | struct nand_flash_dev *type) | 3553 | struct nand_flash_dev *type) |
3555 | { | 3554 | { |
3555 | int busw; | ||
3556 | int i, maf_idx; | 3556 | int i, maf_idx; |
3557 | u8 id_data[8]; | 3557 | u8 id_data[8]; |
3558 | 3558 | ||
@@ -3722,18 +3722,16 @@ ident_done: | |||
3722 | int nand_scan_ident(struct mtd_info *mtd, int maxchips, | 3722 | int nand_scan_ident(struct mtd_info *mtd, int maxchips, |
3723 | struct nand_flash_dev *table) | 3723 | struct nand_flash_dev *table) |
3724 | { | 3724 | { |
3725 | int i, busw, nand_maf_id, nand_dev_id; | 3725 | int i, nand_maf_id, nand_dev_id; |
3726 | struct nand_chip *chip = mtd->priv; | 3726 | struct nand_chip *chip = mtd->priv; |
3727 | struct nand_flash_dev *type; | 3727 | struct nand_flash_dev *type; |
3728 | 3728 | ||
3729 | /* Get buswidth to select the correct functions */ | ||
3730 | busw = chip->options & NAND_BUSWIDTH_16; | ||
3731 | /* Set the default functions */ | 3729 | /* Set the default functions */ |
3732 | nand_set_defaults(chip, busw); | 3730 | nand_set_defaults(chip, chip->options & NAND_BUSWIDTH_16); |
3733 | 3731 | ||
3734 | /* Read the flash type */ | 3732 | /* Read the flash type */ |
3735 | type = nand_get_flash_type(mtd, chip, busw, | 3733 | type = nand_get_flash_type(mtd, chip, &nand_maf_id, |
3736 | &nand_maf_id, &nand_dev_id, table); | 3734 | &nand_dev_id, table); |
3737 | 3735 | ||
3738 | if (IS_ERR(type)) { | 3736 | if (IS_ERR(type)) { |
3739 | if (!(chip->options & NAND_SCAN_SILENT_NODEV)) | 3737 | if (!(chip->options & NAND_SCAN_SILENT_NODEV)) |