Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Boris BREZILLON and committed by
Brian Norris
d39ddbd9 ae02ab00

+10
+10
include/linux/mtd/nand.h
··· 755 755 return &chip->mtd; 756 756 } 757 757 758 + static inline void *nand_get_controller_data(struct nand_chip *chip) 759 + { 760 + return chip->priv; 761 + } 762 + 763 + static inline void nand_set_controller_data(struct nand_chip *chip, void *priv) 764 + { 765 + chip->priv = priv; 766 + } 767 + 758 768 /* 759 769 * NAND Flash Manufacturer ID Codes 760 770 */