linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] physmap: fix mtdconcat support if physmap/mtdconcat were compiled as modules
@ 2011-01-05  2:00 Dmitry Eremin-Solenikov
  2011-01-05  9:07 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-01-05  2:00 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Stefan Roese, linux-mtd

physmap/physmap_of contained compile-time check for mtd concatenation.
However thos modules did not consider that mtd concatenation can be
built as modules. Fix physmap/physmap_of to also support
CONFIG_MTD_CONCAT=m

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Stefan Roese <sr@denx.de>
---
 drivers/mtd/maps/physmap.c    |    4 ++--
 drivers/mtd/maps/physmap_of.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 4c18b98..a224afc 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -59,7 +59,7 @@ static int physmap_flash_remove(struct platform_device *dev)
 #else
 		del_mtd_device(info->cmtd);
 #endif
-#ifdef CONFIG_MTD_CONCAT
+#if defined(CONFIG_MTD_CONCAT) || (defined(CONFIG_MTD_CONCAT_MODULE) && defined(CONFIG_MTD_PHYSMAP_MODULE))
 		if (info->cmtd != info->mtd[0])
 			mtd_concat_destroy(info->cmtd);
 #endif
@@ -159,7 +159,7 @@ static int physmap_flash_probe(struct platform_device *dev)
 		/*
 		 * We detected multiple devices. Concatenate them together.
 		 */
-#ifdef CONFIG_MTD_CONCAT
+#if defined(CONFIG_MTD_CONCAT) || (defined(CONFIG_MTD_CONCAT_MODULE) && defined(CONFIG_MTD_PHYSMAP_MODULE))
 		info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev));
 		if (info->cmtd == NULL)
 			err = -ENXIO;
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 9861814..ffa93e5 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -104,7 +104,7 @@ static int of_flash_remove(struct platform_device *dev)
 		return 0;
 	dev_set_drvdata(&dev->dev, NULL);
 
-#ifdef CONFIG_MTD_CONCAT
+#if defined(CONFIG_MTD_CONCAT) || (defined(CONFIG_MTD_CONCAT_MODULE) && defined(CONFIG_MTD_PHYSMAP_OF_MODULE))
 	if (info->cmtd != info->list[0].mtd) {
 		del_mtd_device(info->cmtd);
 		mtd_concat_destroy(info->cmtd);
@@ -336,7 +336,7 @@ static int __devinit of_flash_probe(struct platform_device *dev,
 		/*
 		 * We detected multiple devices. Concatenate them together.
 		 */
-#ifdef CONFIG_MTD_CONCAT
+#if defined(CONFIG_MTD_CONCAT) || (defined(CONFIG_MTD_CONCAT_MODULE) && defined(CONFIG_MTD_PHYSMAP_OF_MODULE))
 		info->cmtd = mtd_concat_create(mtd_list, info->list_size,
 					       dev_name(&dev->dev));
 		if (info->cmtd == NULL)
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] physmap: fix mtdconcat support if physmap/mtdconcat were compiled as modules
@ 2010-06-11 11:58 Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2010-06-11 11:58 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Stefan Roese, linux-mtd

physmap/physmap_of contained compile-time check for mtd concatenation.
However thos modules did not consider that mtd concatenation can be
built as modules. Fix physmap/physmap_of to also support
CONFIG_MTD_CONCAT=m

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Stefan Roese <sr@denx.de>
---
 drivers/mtd/maps/physmap.c    |    4 ++--
 drivers/mtd/maps/physmap_of.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index d9603f7..7750757 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -59,7 +59,7 @@ static int physmap_flash_remove(struct platform_device *dev)
 #else
 		del_mtd_device(info->cmtd);
 #endif
-#ifdef CONFIG_MTD_CONCAT
+#if defined(CONFIG_MTD_CONCAT) || defined(CONFIG_MTD_CONCAT_MODULE)
 		if (info->cmtd != info->mtd[0])
 			mtd_concat_destroy(info->cmtd);
 #endif
@@ -155,7 +155,7 @@ static int physmap_flash_probe(struct platform_device *dev)
 		/*
 		 * We detected multiple devices. Concatenate them together.
 		 */
-#ifdef CONFIG_MTD_CONCAT
+#if defined(CONFIG_MTD_CONCAT) || defined(CONFIG_MTD_CONCAT_MODULE)
 		info->cmtd = mtd_concat_create(info->mtd, devices_found, dev_name(&dev->dev));
 		if (info->cmtd == NULL)
 			err = -ENXIO;
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 101ee6e..8cb80e1 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -103,7 +103,7 @@ static int of_flash_remove(struct of_device *dev)
 		return 0;
 	dev_set_drvdata(&dev->dev, NULL);
 
-#ifdef CONFIG_MTD_CONCAT
+#if defined(CONFIG_MTD_CONCAT) || defined(CONFIG_MTD_CONCAT_MODULE)
 	if (info->cmtd != info->list[0].mtd) {
 		del_mtd_device(info->cmtd);
 		mtd_concat_destroy(info->cmtd);
@@ -292,7 +292,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
 		/*
 		 * We detected multiple devices. Concatenate them together.
 		 */
-#ifdef CONFIG_MTD_CONCAT
+#if defined(CONFIG_MTD_CONCAT) || defined(CONFIG_MTD_CONCAT_MODULE)
 		info->cmtd = mtd_concat_create(mtd_list, info->list_size,
 					       dev_name(&dev->dev));
 		if (info->cmtd == NULL)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-10 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05  2:00 [PATCH] physmap: fix mtdconcat support if physmap/mtdconcat were compiled as modules Dmitry Eremin-Solenikov
2011-01-05  9:07 ` Artem Bityutskiy
2011-01-10 10:58   ` Stefan Roese
  -- strict thread matches above, loose matches on Subject: below --
2010-06-11 11:58 Dmitry Eremin-Solenikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).