mtd: merge in mtd_to_nand() branch
authorBrian Norris <computersforpeace@gmail.com>
Thu, 19 Nov 2015 19:10:41 +0000 (11:10 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 19 Nov 2015 19:12:28 +0000 (11:12 -0800)
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 <computersforpeace@gmail.com>
1  2 
include/linux/mtd/nand.h

index 4f7c9b97982f649a07765532ac18b60762e194b6,a4839b3f27da0b14baaf946bd3467f63ef96426a..056d1650eb89f2e84751c5a3631e55876fabd53c
@@@ -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
   */