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

Commit a8adc3f0 authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by David Woodhouse
Browse files

mtd: drop CONFIG_MTD_CONCAT ifdefs



As MTD_CONCAT is becoming a part of mtd core, it's now meaningless
to to check for it in ifdefs. Drop such references from MTD code.

Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: default avatarStefan Roese <sr@denx.de>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent e1d6ee72
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -194,16 +194,10 @@ static int __init clps_setup_mtd(struct clps_info *clps, int nr, struct mtd_info
			 * We detected multiple devices.  Concatenate
			 * them together.
			 */
#ifdef CONFIG_MTD_CONCAT
			*rmtd = mtd_concat_create(subdev, found,
						  "clps flash");
			if (*rmtd == NULL)
				ret = -ENXIO;
#else
			printk(KERN_ERR "clps flash: multiple devices "
			       "found but MTD concat support disabled.\n");
			ret = -ENXIO;
#endif
		}
	}

+0 −10
Original line number Diff line number Diff line
@@ -202,7 +202,6 @@ static int armflash_probe(struct platform_device *dev)
	if (info->nr_subdev == 1)
		info->mtd = info->subdev[0].mtd;
	else if (info->nr_subdev > 1) {
#ifdef CONFIG_MTD_CONCAT
		struct mtd_info *cdev[info->nr_subdev];

		/*
@@ -215,11 +214,6 @@ static int armflash_probe(struct platform_device *dev)
					      dev_name(&dev->dev));
		if (info->mtd == NULL)
			err = -ENXIO;
#else
		printk(KERN_ERR "armflash: multiple devices found but "
		       "MTD concat support disabled.\n");
		err = -ENXIO;
#endif
	}

	if (err < 0)
@@ -244,10 +238,8 @@ static int armflash_probe(struct platform_device *dev)
 cleanup:
	if (info->mtd) {
		del_mtd_partitions(info->mtd);
#ifdef CONFIG_MTD_CONCAT
		if (info->mtd != info->subdev[0].mtd)
			mtd_concat_destroy(info->mtd);
#endif
	}
	kfree(info->parts);
 subdev_err:
@@ -272,10 +264,8 @@ static int armflash_remove(struct platform_device *dev)
	if (info) {
		if (info->mtd) {
			del_mtd_partitions(info->mtd);
#ifdef CONFIG_MTD_CONCAT
			if (info->mtd != info->subdev[0].mtd)
				mtd_concat_destroy(info->mtd);
#endif
		}
		kfree(info->parts);

+0 −8
Original line number Diff line number Diff line
@@ -59,10 +59,8 @@ static int physmap_flash_remove(struct platform_device *dev)
#else
		del_mtd_device(info->cmtd);
#endif
#ifdef CONFIG_MTD_CONCAT
		if (info->cmtd != info->mtd[0])
			mtd_concat_destroy(info->cmtd);
#endif
	}

	for (i = 0; i < MAX_RESOURCES; i++) {
@@ -159,15 +157,9 @@ static int physmap_flash_probe(struct platform_device *dev)
		/*
		 * We detected multiple devices. Concatenate them together.
		 */
#ifdef CONFIG_MTD_CONCAT
		info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev));
		if (info->cmtd == NULL)
			err = -ENXIO;
#else
		printk(KERN_ERR "physmap-flash: multiple devices "
		       "found but MTD concat support disabled.\n");
		err = -ENXIO;
#endif
	}
	if (err)
		goto err_out;
+0 −8
Original line number Diff line number Diff line
@@ -104,12 +104,10 @@ static int of_flash_remove(struct platform_device *dev)
		return 0;
	dev_set_drvdata(&dev->dev, NULL);

#ifdef CONFIG_MTD_CONCAT
	if (info->cmtd != info->list[0].mtd) {
		del_mtd_device(info->cmtd);
		mtd_concat_destroy(info->cmtd);
	}
#endif

	if (info->cmtd) {
		if (OF_FLASH_PARTS(info)) {
@@ -334,16 +332,10 @@ static int __devinit of_flash_probe(struct platform_device *dev,
		/*
		 * We detected multiple devices. Concatenate them together.
		 */
#ifdef CONFIG_MTD_CONCAT
		info->cmtd = mtd_concat_create(mtd_list, info->list_size,
					       dev_name(&dev->dev));
		if (info->cmtd == NULL)
			err = -ENXIO;
#else
		printk(KERN_ERR "physmap_of: multiple devices "
		       "found but MTD concat support disabled.\n");
		err = -ENXIO;
#endif
	}
	if (err)
		goto err_out;
+0 −8
Original line number Diff line number Diff line
@@ -232,10 +232,8 @@ static void sa1100_destroy(struct sa_info *info, struct flash_platform_data *pla
		else
			del_mtd_partitions(info->mtd);
#endif
#ifdef CONFIG_MTD_CONCAT
		if (info->mtd != info->subdev[0].mtd)
			mtd_concat_destroy(info->mtd);
#endif
	}

	kfree(info->parts);
@@ -321,7 +319,6 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
		info->mtd = info->subdev[0].mtd;
		ret = 0;
	} else if (info->num_subdev > 1) {
#ifdef CONFIG_MTD_CONCAT
		struct mtd_info *cdev[nr];
		/*
		 * We detected multiple devices.  Concatenate them together.
@@ -333,11 +330,6 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
					      plat->name);
		if (info->mtd == NULL)
			ret = -ENXIO;
#else
		printk(KERN_ERR "SA1100 flash: multiple devices "
		       "found but MTD concat support disabled.\n");
		ret = -ENXIO;
#endif
	}

	if (ret == 0)