mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
mtd: nand: add helpers to access ->priv
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>
This commit is contained in:
parent
ae02ab00aa
commit
d39ddbd9ef
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user