瀏覽代碼

[MTD] [NAND] fix 2 "unused variable" warnings in cafe_nand.c

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Toralf Förster 17 年之前
父節點
當前提交
437d0d299f
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      drivers/mtd/nand/cafe_nand.c

+ 4 - 2
drivers/mtd/nand/cafe_nand.c

@@ -626,10 +626,12 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
 {
 	struct mtd_info *mtd;
 	struct cafe_priv *cafe;
-	struct mtd_partition *parts;
 	uint32_t ctrl;
-	int nr_parts;
 	int err = 0;
+#ifdef CONFIG_MTD_PARTITIONS
+	struct mtd_partition *parts;
+	int nr_parts;
+#endif
 
 	/* Very old versions shared the same PCI ident for all three
 	   functions on the chip. Verify the class too... */