From: Brian Norris Date: Thu, 19 Nov 2015 19:10:41 +0000 (-0800) Subject: mtd: merge in mtd_to_nand() branch X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c291b3c3527fa962f53862426e0e4258d7bd8269;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mtd: merge in mtd_to_nand() branch In case other subsystems want to merge in this helper for use in their drivers, let's bring in that development separately from the rest of MTD -next development. Signed-off-by: Brian Norris --- c291b3c3527fa962f53862426e0e4258d7bd8269 diff --cc include/linux/mtd/nand.h index 4f7c9b97982f,a4839b3f27da..056d1650eb89 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@@ -719,17 -719,11 +719,22 @@@ struct nand_chip void *priv; }; +static inline void nand_set_flash_node(struct nand_chip *chip, + struct device_node *np) +{ + chip->flash_node = np; +} + +static inline struct device_node *nand_get_flash_node(struct nand_chip *chip) +{ + return chip->flash_node; +} + + static inline struct nand_chip *mtd_to_nand(struct mtd_info *mtd) + { + return mtd->priv; + } + /* * NAND Flash Manufacturer ID Codes */