From fac766b916a64c263fdb044bdaba80a52f582ecb Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 24 Jul 2015 14:10:09 +0200 Subject: [PATCH 2/2] mtd: spi-nor: Pass OF node into subdevs The entire mechanism by which the CQSPI driver probes the SPI NORs is probably broken, in particular because it uses dev pointer of the CQSPI and passes it into spi_nor_scan(). Since the dev->of_node therefore points into the of_node of the CQSPI, the spi-nor driver cannot properly parse the OF properties of the subnode and thus can not configure itself accordingly. Add a nasty hack to work around this for now. Signed-off-by: Marek Vasut --- drivers/mtd/spi-nor/cadence-quadspi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c index a18732c..017460e 100644 --- a/drivers/mtd/spi-nor/cadence-quadspi.c +++ b/drivers/mtd/spi-nor/cadence-quadspi.c @@ -1203,6 +1203,7 @@ static int cqspi_probe(struct platform_device *pdev) nor->mtd = mtd; nor->dev = dev; + nor->dev->of_node = np; nor->priv = cqspi; mtd->priv = nor; -- 2.1.4