linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout
@ 2017-05-02 10:29 Boris Brezillon
  2017-05-03 17:32 ` Harvey Hunt
  2017-05-15 19:34 ` Boris Brezillon
  0 siblings, 2 replies; 3+ messages in thread
From: Boris Brezillon @ 2017-05-02 10:29 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, linux-mtd, Harvey Hunt
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Cyrille Pitchen

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;
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout
  2017-05-02 10:29 [PATCH] mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout Boris Brezillon
@ 2017-05-03 17:32 ` Harvey Hunt
  2017-05-15 19:34 ` Boris Brezillon
  1 sibling, 0 replies; 3+ messages in thread
From: Harvey Hunt @ 2017-05-03 17:32 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Cyrille Pitchen

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout
  2017-05-02 10:29 [PATCH] mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout Boris Brezillon
  2017-05-03 17:32 ` Harvey Hunt
@ 2017-05-15 19:34 ` Boris Brezillon
  1 sibling, 0 replies; 3+ messages in thread
From: Boris Brezillon @ 2017-05-15 19:34 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, linux-mtd, Harvey Hunt
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Cyrille Pitchen

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;
>  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-15 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-02 10:29 [PATCH] mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout Boris Brezillon
2017-05-03 17:32 ` Harvey Hunt
2017-05-15 19:34 ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).