summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/m25p80.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-10-30 08:36:00 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-09 13:00:24 +0100
commit10227d518c8a967e5cc552d24545e0ca2c59f84e (patch)
tree8339f75472620aab767f8e6de090df0418800393 /drivers/mtd/devices/m25p80.c
parent4d3c779dfcc7a0ae45e957a521307d731d90d742 (diff)
downloadbarebox-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/devices/m25p80.c')
-rw-r--r--drivers/mtd/devices/m25p80.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 09a8714247..f4b0d604f5 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -239,7 +239,7 @@ static int m25p_probe(struct device_d *dev)
nor->priv = flash;
flash->mtd.priv = nor;
- flash->mtd.parent = &spi->dev;
+ flash->mtd.class_dev.parent = &spi->dev;
flash->spimem = spimem;
if (spi->mode & SPI_RX_QUAD)