mtd: nand: sunxi: remove direct mtd->priv accesses
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Mar 24 11:59:08 PDT 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f671a1f3803428b01272b056d6dc0e09e0df6fd4
Commit: f671a1f3803428b01272b056d6dc0e09e0df6fd4
Parent: 5817b9dc9cc1225feedd9e1282707165fc64c384
Author: Boris BREZILLON <boris.brezillon at free-electrons.com>
AuthorDate: Sat Mar 5 00:21:20 2016 +0100
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Mar 4 16:17:20 2016 -0800
mtd: nand: sunxi: remove direct mtd->priv accesses
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 at free-electrons.com>
Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support")
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
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))
More information about the linux-mtd-cvs
mailing list