[PATCH 3/8] mtd: nand-mxs: Make locally used variable static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fake_ecc_layout is only used in the mxs nand driver, so make it static.
Also it's not necessary to zero the structure.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/mtd/nand/nand_mxs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c
index fb3e2b7958..4317c30805 100644
--- a/drivers/mtd/nand/nand_mxs.c
+++ b/drivers/mtd/nand/nand_mxs.c
@@ -236,7 +236,7 @@ struct mxs_nand_info {
 	int		bb_mark_bit_offset;
 };
 
-struct nand_ecclayout fake_ecc_layout;
+static struct nand_ecclayout fake_ecc_layout;
 
 static inline int mxs_nand_is_imx6(struct mxs_nand_info *info)
 {
@@ -2188,8 +2188,6 @@ static int mxs_nand_probe(struct device_d *dev)
 	if (err)
 		goto err2;
 
-	memset(&fake_ecc_layout, 0, sizeof(fake_ecc_layout));
-
 	/* structures must be linked */
 	chip = &nand_info->nand_chip;
 	mtd = &nand_info->mtd;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux