diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2015-12-10 08:00:41 (GMT) |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-01-07 18:23:41 (GMT) |
commit | d699ed250c07384840263bbbf69cf7b90b45470c (patch) | |
tree | 954ed7cebade37cdf63b87df7e00d6713545c2c1 /drivers/mtd/nand/nandsim.c | |
parent | d9dccc68c5cae4ef7b4a617a93a87b11c6f0c53a (diff) | |
download | linux-d699ed250c07384840263bbbf69cf7b90b45470c.tar.xz |
mtd: nand: make use of nand_set/get_controller_data() helpers
New helpers have been added to avoid directly accessing chip->field. Use
them where appropriate.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Brian: fixed a few rebase conflicts]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/nandsim.c')
-rw-r--r-- | drivers/mtd/nand/nandsim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 78de37d..f57f461 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -667,7 +667,7 @@ static char *get_partition_name(int i) static int init_nandsim(struct mtd_info *mtd) { struct nand_chip *chip = mtd_to_nand(mtd); - struct nandsim *ns = chip->priv; + struct nandsim *ns = nand_get_controller_data(chip); int i, ret = 0; uint64_t remains; uint64_t next_offset; @@ -2244,7 +2244,7 @@ static int __init ns_init_module(void) } nsmtd = nand_to_mtd(chip); nand = (struct nandsim *)(chip + 1); - chip->priv = (void *)nand; + nand_set_controller_data(chip, (void *)nand); /* * Register simulator's callbacks. |