From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kb1xL-00054S-Vh for barebox@lists.infradead.org; Fri, 06 Nov 2020 13:39:14 +0000 From: Sascha Hauer Date: Fri, 6 Nov 2020 14:38:53 +0100 Message-Id: <20201106133900.2656-20-s.hauer@pengutronix.de> In-Reply-To: <20201106133900.2656-1-s.hauer@pengutronix.de> References: <20201106133900.2656-1-s.hauer@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 19/26] mtd: nand: orion: Use nand_to_mtd() To: Barebox List We have a function for getting from the struct nand_chip * to the struct mtd_info *, so use it. Signed-off-by: Sascha Hauer --- drivers/mtd/nand/nand_orion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/nand_orion.c b/drivers/mtd/nand/nand_orion.c index c6f8dc68b4..785d877b3d 100644 --- a/drivers/mtd/nand/nand_orion.c +++ b/drivers/mtd/nand/nand_orion.c @@ -88,8 +88,8 @@ static int orion_nand_probe(struct device_d *dev) u32 val = 0; priv = xzalloc(sizeof(struct orion_nand)); - mtd = &priv->chip.mtd; chip = &priv->chip; + mtd = nand_to_mtd(chip); iores = dev_request_mem_resource(dev, 0); if (IS_ERR(iores)) -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox