aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCai Zhiyong <caizhiyong@huawei.com>2013-12-25 07:11:15 -0500
committerBrian Norris <computersforpeace@gmail.com>2014-03-11 01:42:30 -0400
commitbb77082fa2584f0855e614e99b5ffd40b9cf4251 (patch)
treec93116bbdcb88bc49f9ba15e2e3c169c4e9a32f9
parente634ce51baa52c131e4a35c01bba9e596a0eb86d (diff)
mtd: nand: remove unused function input parameter
The nand_get_flash_type parameter "busw" input value is not used by any branch, and it is updated before use it in the function, so remove it, define the "busw" as an internal variable. Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--drivers/mtd/nand/nand_base.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 62e5d26464f0..71c5c7a77053 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 */
3550static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, 3550static 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:
3722int nand_scan_ident(struct mtd_info *mtd, int maxchips, 3722int 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))