Message ID | 1493720953-8471-1-git-send-email-boris.brezillon@free-electrons.com |
---|---|
State | Accepted |
Commit | 0b2f93dc0099e3b8a739b8918eeb995e12520940 |
Delegated to: | Boris Brezillon |
Headers | show |
Hi Boris, On 05/02/2017 11:29 AM, 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 <boris.brezillon@free-electrons.com> > --- > 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; > } > Looks good to me. Acked-by: Harvey Hunt <harveyhuntnexus@gmail.com> Thanks, Harvey
On Tue, 2 May 2017 12:29:13 +0200 Boris Brezillon <boris.brezillon@free-electrons.com> 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 <boris.brezillon@free-electrons.com> 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; > }
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; }
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 <boris.brezillon@free-electrons.com> --- drivers/mtd/nand/jz4780_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)