Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99d38964 authored by Mark F. Brown's avatar Mark F. Brown Committed by David Woodhouse
Browse files

mtd: pxa3xx: fix build error when CONFIG_MTD_PARTITIONS is not defined

parent b8db2f51
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1320,6 +1320,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
		goto fail_free_irq;
		goto fail_free_irq;
	}
	}


#ifdef CONFIG_MTD_PARTITIONS
	if (mtd_has_cmdlinepart()) {
	if (mtd_has_cmdlinepart()) {
		static const char *probes[] = { "cmdlinepart", NULL };
		static const char *probes[] = { "cmdlinepart", NULL };
		struct mtd_partition *parts;
		struct mtd_partition *parts;
@@ -1332,6 +1333,9 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
	}
	}


	return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
	return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
#else
	return 0;
#endif


fail_free_irq:
fail_free_irq:
	free_irq(irq, info);
	free_irq(irq, info);
@@ -1364,7 +1368,9 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
	platform_set_drvdata(pdev, NULL);
	platform_set_drvdata(pdev, NULL);


	del_mtd_device(mtd);
	del_mtd_device(mtd);
#ifdef CONFIG_MTD_PARTITIONS
	del_mtd_partitions(mtd);
	del_mtd_partitions(mtd);
#endif
	irq = platform_get_irq(pdev, 0);
	irq = platform_get_irq(pdev, 0);
	if (irq >= 0)
	if (irq >= 0)
		free_irq(irq, info);
		free_irq(irq, info);