diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2015-12-10 03:00:32 -0500 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-12-18 15:44:57 -0500 |
commit | 4883090bedd79c2c5b408976f0f49e7041cbc3cb (patch) | |
tree | ee5f8887c38fc5280ddc6ef5ca0d8016b8cec870 /arch/cris/arch-v32 | |
parent | ba4ed8605cb09b2cb72bf14499cf4605a0f9eb23 (diff) |
cris: nand: use the mtd instance embedded in struct nand_chip
struct nand_chip now embeds an mtd device. Patch all drivers to make use
of this mtd instance instead of using the instance embedded in their
private struct or dynamically allocated.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r-- | arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 3 | ||||
-rw-r--r-- | arch/cris/arch-v32/drivers/mach-fs/nandflash.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c index db953cfabee1..ee74e45a5cf4 100644 --- a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c +++ b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #define CE_BIT 12 | 36 | #define CE_BIT 12 |
37 | 37 | ||
38 | struct mtd_info_wrapper { | 38 | struct mtd_info_wrapper { |
39 | struct mtd_info info; | ||
40 | struct nand_chip chip; | 39 | struct nand_chip chip; |
41 | }; | 40 | }; |
42 | 41 | ||
@@ -148,7 +147,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) | |||
148 | 147 | ||
149 | /* Get pointer to private data */ | 148 | /* Get pointer to private data */ |
150 | this = &wrapper->chip; | 149 | this = &wrapper->chip; |
151 | crisv32_mtd = &wrapper->info; | 150 | crisv32_mtd = nand_to_mtd(this); |
152 | 151 | ||
153 | /* Link the private data with the MTD structure */ | 152 | /* Link the private data with the MTD structure */ |
154 | crisv32_mtd->priv = this; | 153 | crisv32_mtd->priv = this; |
diff --git a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c index 22a6467ffe1f..56262973ed2b 100644 --- a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c +++ b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #define BY_BIT 7 | 31 | #define BY_BIT 7 |
32 | 32 | ||
33 | struct mtd_info_wrapper { | 33 | struct mtd_info_wrapper { |
34 | struct mtd_info info; | ||
35 | struct nand_chip chip; | 34 | struct nand_chip chip; |
36 | }; | 35 | }; |
37 | 36 | ||
@@ -129,7 +128,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) | |||
129 | 128 | ||
130 | /* Get pointer to private data */ | 129 | /* Get pointer to private data */ |
131 | this = &wrapper->chip; | 130 | this = &wrapper->chip; |
132 | crisv32_mtd = &wrapper->info; | 131 | crisv32_mtd = nand_to_mtd(this); |
133 | 132 | ||
134 | pa_oe.oe |= 1 << CE_BIT; | 133 | pa_oe.oe |= 1 << CE_BIT; |
135 | pa_oe.oe |= 1 << ALE_BIT; | 134 | pa_oe.oe |= 1 << ALE_BIT; |