linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: sunxi: remove direct mtd->priv accesses
@ 2016-03-04 23:21 Boris Brezillon
  2016-03-05  0:18 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Brezillon @ 2016-03-04 23:21 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, linux-mtd
  Cc: Maxime Ripard, Chen-Yu Tsai, linux-sunxi, Boris Brezillon

mtd->priv is no longer pointing to the struct nand_chip it is attached to.
Replace those accesses by mtd_to_nand() calls.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support")
---
Sorry for the inconvenience, but apparently I was not expecting
the mtd_to_nand() rework to be taken before the randomizer patch,
and I forgot to repost a version replacing mtd->priv by mtd_to_nand().
---
 drivers/mtd/nand/sunxi_nand.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index b5ea6b3..1c03eee 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -642,7 +642,7 @@ static u16 sunxi_nfc_randomizer_state(struct mtd_info *mtd, int page, bool ecc)
 static void sunxi_nfc_randomizer_config(struct mtd_info *mtd,
 					int page, bool ecc)
 {
-	struct nand_chip *nand = mtd->priv;
+	struct nand_chip *nand = mtd_to_nand(mtd);
 	struct sunxi_nfc *nfc = to_sunxi_nfc(nand->controller);
 	u32 ecc_ctl = readl(nfc->regs + NFC_REG_ECC_CTL);
 	u16 state;
@@ -658,7 +658,7 @@ static void sunxi_nfc_randomizer_config(struct mtd_info *mtd,
 
 static void sunxi_nfc_randomizer_enable(struct mtd_info *mtd)
 {
-	struct nand_chip *nand = mtd->priv;
+	struct nand_chip *nand = mtd_to_nand(mtd);
 	struct sunxi_nfc *nfc = to_sunxi_nfc(nand->controller);
 
 	if (!(nand->options & NAND_NEED_SCRAMBLING))
@@ -670,7 +670,7 @@ static void sunxi_nfc_randomizer_enable(struct mtd_info *mtd)
 
 static void sunxi_nfc_randomizer_disable(struct mtd_info *mtd)
 {
-	struct nand_chip *nand = mtd->priv;
+	struct nand_chip *nand = mtd_to_nand(mtd);
 	struct sunxi_nfc *nfc = to_sunxi_nfc(nand->controller);
 
 	if (!(nand->options & NAND_NEED_SCRAMBLING))
-- 
2.1.4

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

* Re: [PATCH] mtd: nand: sunxi: remove direct mtd->priv accesses
  2016-03-04 23:21 [PATCH] mtd: nand: sunxi: remove direct mtd->priv accesses Boris Brezillon
@ 2016-03-05  0:18 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2016-03-05  0:18 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: David Woodhouse, linux-mtd, Maxime Ripard, Chen-Yu Tsai,
	linux-sunxi

On Sat, Mar 05, 2016 at 12:21:20AM +0100, Boris Brezillon wrote:
> mtd->priv is no longer pointing to the struct nand_chip it is attached to.
> Replace those accesses by mtd_to_nand() calls.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support")
> ---

Applied, thanks!

> Sorry for the inconvenience, but apparently I was not expecting
> the mtd_to_nand() rework to be taken before the randomizer patch,
> and I forgot to repost a version replacing mtd->priv by mtd_to_nand().

Eh, probably not entirely your fault. I can be erratic with my
review/acceptance times.

Brian

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

end of thread, other threads:[~2016-03-05  0:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-04 23:21 [PATCH] mtd: nand: sunxi: remove direct mtd->priv accesses Boris Brezillon
2016-03-05  0:18 ` Brian Norris

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).