From: Boris BREZILLON Date: Mon, 16 Nov 2015 13:37:36 +0000 (+0100) Subject: doc: mtd: nand: update examples to use mtd_to_nand() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1e6460abf739310fe695bafac30c2be39d18c8f9;p=linux-beck.git doc: mtd: nand: update examples to use mtd_to_nand() mtd_to_nand() has been introduced to hide accesses to mtd->priv. All NAND controller drivers should use it instead of directly accessing the ->priv field. Signed-off-by: Boris Brezillon Signed-off-by: Brian Norris --- diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index 7da8f0402af5..403a7abfc2bc 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl @@ -235,7 +235,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd) static void board_hwcontrol(struct mtd_info *mtd, int cmd) { - struct nand_chip *this = (struct nand_chip *) mtd->priv; + struct nand_chip *this = mtd_to_nand(mtd); switch(cmd){ case NAND_CTL_SETCLE: this->IO_ADDR_W |= CLE_ADRR_BIT; break; case NAND_CTL_CLRCLE: this->IO_ADDR_W &= ~CLE_ADRR_BIT; break; @@ -399,7 +399,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) static void board_select_chip (struct mtd_info *mtd, int chip) { - struct nand_chip *this = (struct nand_chip *) mtd->priv; + struct nand_chip *this = mtd_to_nand(mtd); /* Deselect all chips */ this->IO_ADDR_R &= ~BOARD_NAND_ADDR_MASK;