diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-10-30 08:36:00 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-11-09 13:00:24 +0100 |
commit | 10227d518c8a967e5cc552d24545e0ca2c59f84e (patch) | |
tree | 8339f75472620aab767f8e6de090df0418800393 /drivers/mtd/nand/nand_mxs.c | |
parent | 4d3c779dfcc7a0ae45e957a521307d731d90d742 (diff) | |
download | barebox-10227d518c8a967e5cc552d24545e0ca2c59f84e.tar.gz barebox-10227d518c8a967e5cc552d24545e0ca2c59f84e.tar.xz |
mtd: Use classdev->parent
Instead of mtd->parent we can use mtd->classdev.parent which points to
the same device. With this we can remove the 'parent' member of struct
mtd_info. This member exists in the Linux kernel as well, but is of type
struct mtd_info, so this is done as preparation to re-add mtd->parent
with the same type as in Linux.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/nand/nand_mxs.c')
-rw-r--r-- | drivers/mtd/nand/nand_mxs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c index d4f0262755..6c77247bf5 100644 --- a/drivers/mtd/nand/nand_mxs.c +++ b/drivers/mtd/nand/nand_mxs.c @@ -338,7 +338,7 @@ static int mxs_nand_calc_geo(struct nand_chip *chip) int gf_len = 13; /* length of Galois Field for non-DDR nand */ int max_ecc_strength; - nand_of_parse_node(mtd, mtd->parent->device_node); + nand_of_parse_node(mtd, mtd->class_dev.parent->device_node); max_ecc_strength = ((mtd->oobsize - MXS_NAND_METADATA_SIZE) * 8) / (gf_len * ecc_chunk_count); @@ -2191,7 +2191,7 @@ static int mxs_nand_probe(struct device_d *dev) /* structures must be linked */ chip = &nand_info->nand_chip; mtd = &nand_info->nand_chip.mtd; - mtd->parent = dev; + mtd->class_dev.parent = dev; chip->priv = nand_info; |