]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mtd: Move struct mtd_concat definition to header file
authorAmit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Wed, 4 Feb 2026 08:32:17 +0000 (09:32 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 25 Feb 2026 16:34:20 +0000 (17:34 +0100)
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>
drivers/mtd/mtdconcat.c
include/linux/mtd/concat.h

index 9eb5d919d9bad225c76cf65332891dcd0e9cfa4b..241d15235d0101fce40fc64a054717c1721d3e97 100644 (file)
 
 #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:
index d6f653e074263b6383e3413d7c0ff29728b7eca1..b42d9af87c4ef70c55ba57fe784ad115365ac80a 100644 (file)
@@ -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      */