Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Amit Kumar Mahapatra and committed by
Miquel Raynal
59509da0 5c543de8

+12 -12
-12
drivers/mtd/mtdconcat.c
··· 21 21 #include <asm/div64.h> 22 22 23 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 - 35 - /* 36 24 * how to calculate the size required for the above structure, 37 25 * including the pointer array subdev points to: 38 26 */
+12
include/linux/mtd/concat.h
··· 9 9 #define MTD_CONCAT_H 10 10 11 11 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 + 12 24 struct mtd_info *mtd_concat_create( 13 25 struct mtd_info *subdev[], /* subdevices to concatenate */ 14 26 int num_devs, /* number of subdevices */