summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>2026-02-04 11:32:17 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2026-02-25 19:34:20 +0300
commit59509da0cb51dc48e4edc57d7d3ef1d424c58fc9 (patch)
tree2c5ce4d2fb375597043689b2a23dc5c328efc3ff
parent5c543de856c463235cef0808c2b100e475fc8438 (diff)
downloadlinux-59509da0cb51dc48e4edc57d7d3ef1d424c58fc9.tar.xz
mtd: Move struct mtd_concat definition to header file
To enable a more generic approach for concatenating MTD devices, struct mtd_concat should be accessible beyond the mtdconcat driver. Therefore, the definition is being moved to a header file. Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-rw-r--r--drivers/mtd/mtdconcat.c12
-rw-r--r--include/linux/mtd/concat.h12
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 9eb5d919d9ba..241d15235d01 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -21,18 +21,6 @@
#include <asm/div64.h>
/*
- * Our storage structure:
- * Subdev points to an array of pointers to struct mtd_info objects
- * which is allocated along with this structure
- *
- */
-struct mtd_concat {
- struct mtd_info mtd;
- int num_subdev;
- struct mtd_info **subdev;
-};
-
-/*
* how to calculate the size required for the above structure,
* including the pointer array subdev points to:
*/
diff --git a/include/linux/mtd/concat.h b/include/linux/mtd/concat.h
index d6f653e07426..b42d9af87c4e 100644
--- a/include/linux/mtd/concat.h
+++ b/include/linux/mtd/concat.h
@@ -9,6 +9,18 @@
#define MTD_CONCAT_H
+/*
+ * Our storage structure:
+ * Subdev points to an array of pointers to struct mtd_info objects
+ * which is allocated along with this structure
+ *
+ */
+struct mtd_concat {
+ struct mtd_info mtd;
+ int num_subdev;
+ struct mtd_info **subdev;
+};
+
struct mtd_info *mtd_concat_create(
struct mtd_info *subdev[], /* subdevices to concatenate */
int num_devs, /* number of subdevices */