mediatek: sync patches and add more ethernet stability fixes
[openwrt.git] / target / linux / mediatek / patches-4.4 / 0055-mtd-nand-embed-an-mtd_info-structure-into-nand_chip.patch
1 From f18fcf4468ffdce17747f3d331f998a7e9264142 Mon Sep 17 00:00:00 2001
2 From: Boris BREZILLON <boris.brezillon@free-electrons.com>
3 Date: Tue, 1 Dec 2015 12:03:06 +0100
4 Subject: [PATCH 55/91] mtd: nand: embed an mtd_info structure into nand_chip
5
6 Currently all NAND controller drivers are providing both the mtd_info and
7 nand_chip struct and then let the NAND subsystem to initialize a few
8 things before registering the mtd instance to the MTD layer.
9 Embed an mtd_info field into nand_chip to add some consistency to all NAND
10 controller drivers.
11 This change will also help factorizing boilerplate code copied in all NAND
12 drivers.
13
14 Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
15 Signed-off-by: Brian Norris <computersforpeace@gmail.com>
16 ---
17  include/linux/mtd/nand.h |    2 ++
18  1 file changed, 2 insertions(+)
19
20 diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
21 index 345f864..1ded588 100644
22 --- a/include/linux/mtd/nand.h
23 +++ b/include/linux/mtd/nand.h
24 @@ -540,6 +540,7 @@ struct nand_buffers {
25  
26  /**
27   * struct nand_chip - NAND Private Flash Chip Data
28 + * @mtd:               MTD device registered to the MTD framework
29   * @IO_ADDR_R:         [BOARDSPECIFIC] address to read the 8 I/O lines of the
30   *                     flash device
31   * @IO_ADDR_W:         [BOARDSPECIFIC] address to write the 8 I/O lines of the
32 @@ -640,6 +641,7 @@ struct nand_buffers {
33   */
34  
35  struct nand_chip {
36 +       struct mtd_info mtd;
37         void __iomem *IO_ADDR_R;
38         void __iomem *IO_ADDR_W;
39  
40 -- 
41 1.7.10.4
42