summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/stmicro.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi/stmicro.c')
-rw-r--r--drivers/mtd/spi/stmicro.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
index 86324e4..e7dda91 100644
--- a/drivers/mtd/spi/stmicro.c
+++ b/drivers/mtd/spi/stmicro.c
@@ -64,9 +64,10 @@ struct stmicro_spi_flash_params {
const char *name;
};
+/* spi_flash needs to be first so upper layers can free() it */
struct stmicro_spi_flash {
- const struct stmicro_spi_flash_params *params;
struct spi_flash flash;
+ const struct stmicro_spi_flash_params *params;
};
static inline struct stmicro_spi_flash *to_stmicro_spi_flash(struct spi_flash