Skip to content

Commit 59509da

Browse files
Amit Kumar Mahapatramiquelraynal
authored andcommitted
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>
1 parent 5c543de commit 59509da

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

drivers/mtd/mtdconcat.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@
2020

2121
#include <asm/div64.h>
2222

23-
/*
24-
* Our storage structure:
25-
* Subdev points to an array of pointers to struct mtd_info objects
26-
* which is allocated along with this structure
27-
*
28-
*/
29-
struct mtd_concat {
30-
struct mtd_info mtd;
31-
int num_subdev;
32-
struct mtd_info **subdev;
33-
};
34-
3523
/*
3624
* how to calculate the size required for the above structure,
3725
* including the pointer array subdev points to:

include/linux/mtd/concat.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
#define MTD_CONCAT_H
1010

1111

12+
/*
13+
* Our storage structure:
14+
* Subdev points to an array of pointers to struct mtd_info objects
15+
* which is allocated along with this structure
16+
*
17+
*/
18+
struct mtd_concat {
19+
struct mtd_info mtd;
20+
int num_subdev;
21+
struct mtd_info **subdev;
22+
};
23+
1224
struct mtd_info *mtd_concat_create(
1325
struct mtd_info *subdev[], /* subdevices to concatenate */
1426
int num_devs, /* number of subdevices */

0 commit comments

Comments
 (0)