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

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
...@@ -194,16 +194,10 @@ static int __init clps_setup_mtd(struct clps_info *clps, int nr, struct mtd_info ...@@ -194,16 +194,10 @@ static int __init clps_setup_mtd(struct clps_info *clps, int nr, struct mtd_info
* We detected multiple devices. Concatenate * We detected multiple devices. Concatenate
* them together. * them together.
*/ */
#ifdef CONFIG_MTD_CONCAT
*rmtd = mtd_concat_create(subdev, found, *rmtd = mtd_concat_create(subdev, found,
"clps flash"); "clps flash");
if (*rmtd == NULL) if (*rmtd == NULL)
ret = -ENXIO; ret = -ENXIO;
#else
printk(KERN_ERR "clps flash: multiple devices "
"found but MTD concat support disabled.\n");
ret = -ENXIO;
#endif
} }
} }
......
...@@ -202,7 +202,6 @@ static int armflash_probe(struct platform_device *dev) ...@@ -202,7 +202,6 @@ static int armflash_probe(struct platform_device *dev)
if (info->nr_subdev == 1) if (info->nr_subdev == 1)
info->mtd = info->subdev[0].mtd; info->mtd = info->subdev[0].mtd;
else if (info->nr_subdev > 1) { else if (info->nr_subdev > 1) {
#ifdef CONFIG_MTD_CONCAT
struct mtd_info *cdev[info->nr_subdev]; struct mtd_info *cdev[info->nr_subdev];
/* /*
...@@ -215,11 +214,6 @@ static int armflash_probe(struct platform_device *dev) ...@@ -215,11 +214,6 @@ static int armflash_probe(struct platform_device *dev)
dev_name(&dev->dev)); dev_name(&dev->dev));
if (info->mtd == NULL) if (info->mtd == NULL)
err = -ENXIO; err = -ENXIO;
#else
printk(KERN_ERR "armflash: multiple devices found but "
"MTD concat support disabled.\n");
err = -ENXIO;
#endif
} }
if (err < 0) if (err < 0)
...@@ -244,10 +238,8 @@ static int armflash_probe(struct platform_device *dev) ...@@ -244,10 +238,8 @@ static int armflash_probe(struct platform_device *dev)
cleanup: cleanup:
if (info->mtd) { if (info->mtd) {
del_mtd_partitions(info->mtd); del_mtd_partitions(info->mtd);
#ifdef CONFIG_MTD_CONCAT
if (info->mtd != info->subdev[0].mtd) if (info->mtd != info->subdev[0].mtd)
mtd_concat_destroy(info->mtd); mtd_concat_destroy(info->mtd);
#endif
} }
kfree(info->parts); kfree(info->parts);
subdev_err: subdev_err:
...@@ -272,10 +264,8 @@ static int armflash_remove(struct platform_device *dev) ...@@ -272,10 +264,8 @@ static int armflash_remove(struct platform_device *dev)
if (info) { if (info) {
if (info->mtd) { if (info->mtd) {
del_mtd_partitions(info->mtd); del_mtd_partitions(info->mtd);
#ifdef CONFIG_MTD_CONCAT
if (info->mtd != info->subdev[0].mtd) if (info->mtd != info->subdev[0].mtd)
mtd_concat_destroy(info->mtd); mtd_concat_destroy(info->mtd);
#endif
} }
kfree(info->parts); kfree(info->parts);
......
...@@ -59,10 +59,8 @@ static int physmap_flash_remove(struct platform_device *dev) ...@@ -59,10 +59,8 @@ static int physmap_flash_remove(struct platform_device *dev)
#else #else
del_mtd_device(info->cmtd); del_mtd_device(info->cmtd);
#endif #endif
#ifdef CONFIG_MTD_CONCAT
if (info->cmtd != info->mtd[0]) if (info->cmtd != info->mtd[0])
mtd_concat_destroy(info->cmtd); mtd_concat_destroy(info->cmtd);
#endif
} }
for (i = 0; i < MAX_RESOURCES; i++) { for (i = 0; i < MAX_RESOURCES; i++) {
...@@ -159,15 +157,9 @@ static int physmap_flash_probe(struct platform_device *dev) ...@@ -159,15 +157,9 @@ static int physmap_flash_probe(struct platform_device *dev)
/* /*
* We detected multiple devices. Concatenate them together. * We detected multiple devices. Concatenate them together.
*/ */
#ifdef CONFIG_MTD_CONCAT
info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev)); info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev));
if (info->cmtd == NULL) if (info->cmtd == NULL)
err = -ENXIO; err = -ENXIO;
#else
printk(KERN_ERR "physmap-flash: multiple devices "
"found but MTD concat support disabled.\n");
err = -ENXIO;
#endif
} }
if (err) if (err)
goto err_out; goto err_out;
......
...@@ -104,12 +104,10 @@ static int of_flash_remove(struct platform_device *dev) ...@@ -104,12 +104,10 @@ static int of_flash_remove(struct platform_device *dev)
return 0; return 0;
dev_set_drvdata(&dev->dev, NULL); dev_set_drvdata(&dev->dev, NULL);
#ifdef CONFIG_MTD_CONCAT
if (info->cmtd != info->list[0].mtd) { if (info->cmtd != info->list[0].mtd) {
del_mtd_device(info->cmtd); del_mtd_device(info->cmtd);
mtd_concat_destroy(info->cmtd); mtd_concat_destroy(info->cmtd);
} }
#endif
if (info->cmtd) { if (info->cmtd) {
if (OF_FLASH_PARTS(info)) { if (OF_FLASH_PARTS(info)) {
...@@ -334,16 +332,10 @@ static int __devinit of_flash_probe(struct platform_device *dev, ...@@ -334,16 +332,10 @@ static int __devinit of_flash_probe(struct platform_device *dev,
/* /*
* We detected multiple devices. Concatenate them together. * We detected multiple devices. Concatenate them together.
*/ */
#ifdef CONFIG_MTD_CONCAT
info->cmtd = mtd_concat_create(mtd_list, info->list_size, info->cmtd = mtd_concat_create(mtd_list, info->list_size,
dev_name(&dev->dev)); dev_name(&dev->dev));
if (info->cmtd == NULL) if (info->cmtd == NULL)
err = -ENXIO; err = -ENXIO;
#else
printk(KERN_ERR "physmap_of: multiple devices "
"found but MTD concat support disabled.\n");
err = -ENXIO;
#endif
} }
if (err) if (err)
goto err_out; goto err_out;
......
...@@ -232,10 +232,8 @@ static void sa1100_destroy(struct sa_info *info, struct flash_platform_data *pla ...@@ -232,10 +232,8 @@ static void sa1100_destroy(struct sa_info *info, struct flash_platform_data *pla
else else
del_mtd_partitions(info->mtd); del_mtd_partitions(info->mtd);
#endif #endif
#ifdef CONFIG_MTD_CONCAT
if (info->mtd != info->subdev[0].mtd) if (info->mtd != info->subdev[0].mtd)
mtd_concat_destroy(info->mtd); mtd_concat_destroy(info->mtd);
#endif
} }
kfree(info->parts); kfree(info->parts);
...@@ -321,7 +319,6 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat) ...@@ -321,7 +319,6 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
info->mtd = info->subdev[0].mtd; info->mtd = info->subdev[0].mtd;
ret = 0; ret = 0;
} else if (info->num_subdev > 1) { } else if (info->num_subdev > 1) {
#ifdef CONFIG_MTD_CONCAT
struct mtd_info *cdev[nr]; struct mtd_info *cdev[nr];
/* /*
* We detected multiple devices. Concatenate them together. * We detected multiple devices. Concatenate them together.
...@@ -333,11 +330,6 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat) ...@@ -333,11 +330,6 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
plat->name); plat->name);
if (info->mtd == NULL) if (info->mtd == NULL)
ret = -ENXIO; ret = -ENXIO;
#else
printk(KERN_ERR "SA1100 flash: multiple devices "
"found but MTD concat support disabled.\n");
ret = -ENXIO;
#endif
} }
if (ret == 0) if (ret == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment