summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2010-11-23 20:02:13 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-12-03 17:34:41 +0100
commit2ebf0622cdc5d2b51f22b68a0983d90df8a976c8 (patch)
tree9d3a658b2c839e98075b3faa06fd9b889a3d6c6e /drivers
parentmtd: fsl_elbc_nand: fix jffs2 problem after NAND-flash image record in u-boot (diff)
downloadlinux-2ebf0622cdc5d2b51f22b68a0983d90df8a976c8.tar.xz
linux-2ebf0622cdc5d2b51f22b68a0983d90df8a976c8.zip
mtd: mxc_nand: Fix warning on nr_parts unused variable
If CONFIG_MTD_PARTITIONS is not selected, then the following warning is generated: CC drivers/mtd/nand/mxc_nand.o drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_probe': drivers/mtd/nand/mxc_nand.c:1014: warning: unused variable 'nr_parts' Fix it by marking nr_parts as __maybe_unused. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/mxc_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 214b03afdd48..ef932ba55a0b 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1009,7 +1009,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
struct mxc_nand_platform_data *pdata = pdev->dev.platform_data;
struct mxc_nand_host *host;
struct resource *res;
- int err = 0, nr_parts = 0;
+ int err = 0, __maybe_unused nr_parts = 0;
struct nand_ecclayout *oob_smallpage, *oob_largepage;
/* Allocate memory for MTD device structure and private data */