Skip to content

Commit

Permalink
mtd: nand: add helpers to access ->priv
Browse files Browse the repository at this point in the history
Add two helpers to access the field reserved for private controller data.
This makes it clearer what this field is reserved for and ease future
refactoring.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Boris BREZILLON authored and Brian Norris committed Jan 7, 2016
1 parent ae02ab0 commit d39ddbd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/linux/mtd/nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,16 @@ static inline struct mtd_info *nand_to_mtd(struct nand_chip *chip)
return &chip->mtd;
}

static inline void *nand_get_controller_data(struct nand_chip *chip)
{
return chip->priv;
}

static inline void nand_set_controller_data(struct nand_chip *chip, void *priv)
{
chip->priv = priv;
}

/*
* NAND Flash Manufacturer ID Codes
*/
Expand Down

0 comments on commit d39ddbd

Please sign in to comment.