Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1270128 > unrolled thread

[PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()

Started byBoris Brezillon <boris.brezillon@free-electrons.com>
First post2015-11-16 14:40 +0100
Last post2015-11-19 20:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand() Boris Brezillon <boris.brezillon@free-electrons.com> - 2015-11-16 14:40 +0100
    Re: [PATCH 03/27] mtd: nand: update examples in the documentation to  use mtd_to_nand() Brian Norris <computersforpeace@gmail.com> - 2015-11-19 20:30 +0100

#1270128 — [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2015-11-16 14:40 +0100
Subject[PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()
Message-ID<qvsaK-7Us-3@gated-at.bofh.it>
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 <boris.brezillon@free-electrons.com>
---
 Documentation/DocBook/mtdnand.tmpl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 7da8f04..403a7ab 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)
 		<programlisting>
 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 &amp;= ~CLE_ADRR_BIT; break;
@@ -399,7 +399,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
 		<programlisting>
 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 &amp;= ~BOARD_NAND_ADDR_MASK;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1273433 — Re: [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()

FromBrian Norris <computersforpeace@gmail.com>
Date2015-11-19 20:30 +0100
SubjectRe: [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand()
Message-ID<qwD46-5aJ-11@gated-at.bofh.it>
In reply to#1270128
On Mon, Nov 16, 2015 at 02:37:36PM +0100, Boris Brezillon wrote:
> 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 <boris.brezillon@free-electrons.com>

Pushed to l2-mtd.git
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web