From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dALl8-0002vt-Gt for linux-mtd@lists.infradead.org; Mon, 15 May 2017 19:34:24 +0000 Date: Mon, 15 May 2017 21:34:00 +0200 From: Boris Brezillon To: Boris Brezillon , Richard Weinberger , linux-mtd@lists.infradead.org, Harvey Hunt Cc: David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen Subject: Re: [PATCH] mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout Message-ID: <20170515213400.4441fbee@bbrezillon> In-Reply-To: <1493720953-8471-1-git-send-email-boris.brezillon@free-electrons.com> References: <1493720953-8471-1-git-send-email-boris.brezillon@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2 May 2017 12:29:13 +0200 Boris Brezillon wrote: > The mtd_set_ooblayout() accesor has been added to hide internals of > mtd_info and ease future refactoring. Call mtd_set_ooblayout() instead of > directly accessing mtd->ooblayout. > > Signed-off-by: Boris Brezillon Applied to nand/next. > --- > drivers/mtd/nand/jz4780_nand.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/nand/jz4780_nand.c b/drivers/mtd/nand/jz4780_nand.c > index a39bb70175ee..8bc835f71b26 100644 > --- a/drivers/mtd/nand/jz4780_nand.c > +++ b/drivers/mtd/nand/jz4780_nand.c > @@ -205,7 +205,7 @@ static int jz4780_nand_init_ecc(struct jz4780_nand_chip *nand, struct device *de > return -EINVAL; > } > > - mtd->ooblayout = &nand_ooblayout_lp_ops; > + mtd_set_ooblayout(mtd, &nand_ooblayout_lp_ops); > > return 0; > }