diff options
author | Cai Zhiyong <caizhiyong@huawei.com> | 2013-12-25 07:11:15 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:57:52 -0400 |
commit | 3263fabdabc4b63ea8dc85fa7b6802a05e6de1fa (patch) | |
tree | 4878bc6e138c317d3f7277c89acdc0b01c64921a /drivers/mtd/nand | |
parent | 018f8680f1fdbcaefe8659f23aa289f1bc623faa (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>
Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/mtd/nand')
-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)) |