summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/nand_base.c
diff options
context:
space:
mode:
authorMiquel Raynal2018-07-17 09:08:02 +0200
committerMiquel Raynal2018-07-31 09:45:52 +0200
commit7da45139d264f3b7ead04e00ebb29b189cf9826e (patch)
tree9b4a0b7988b5fd82467bf5070d02574838c609f6 /drivers/mtd/nand/raw/nand_base.c
parentmtd: rawnand: Remove unused caller_is_module() definition (diff)
downloadkernel-qcow2-linux-7da45139d264f3b7ead04e00ebb29b189cf9826e.tar.gz
kernel-qcow2-linux-7da45139d264f3b7ead04e00ebb29b189cf9826e.tar.xz
kernel-qcow2-linux-7da45139d264f3b7ead04e00ebb29b189cf9826e.zip
mtd: rawnand: better name for the controller structure
In the raw NAND core, a NAND chip is described by a nand_chip structure, while a NAND controller is described with a nand_hw_control structure which is not very meaningful. Rename this structure nand_controller. As the structure gets renamed, it is logical to also rename the core function initializing it from nand_hw_control_init() to nand_controller_init(). Lastly, the 'hwcontrol' entry of the nand_chip structure is not meaningful neither while it has the role of fallback when no controller structure is provided by the driver (the controller driver is dumb and can only control a single chip). Thus, it is renamed dummy_controller. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/nand_base.c')
-rw-r--r--drivers/mtd/nand/raw/nand_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index e545e03a214e..dcdf0f373100 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -5000,8 +5000,8 @@ static void nand_set_defaults(struct nand_chip *chip)
chip->read_buf = busw ? nand_read_buf16 : nand_read_buf;
if (!chip->controller) {
- chip->controller = &chip->hwcontrol;
- nand_hw_control_init(chip->controller);
+ chip->controller = &chip->dummy_controller;
+ nand_controller_init(chip->controller);
}
if (!chip->buf_align)