summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-12-14 10:13:31 -0500
committerBrian Norris <computersforpeace@gmail.com>2015-12-18 17:24:36 -0500
commit8142b47ef33c655a34e08efd46b65732fe190675 (patch)
tree7d44de2a97136ef70c7c42f64ff132ee2d5df581 /include/linux/mtd
parent29574ede097438c560e8115caff9b6b8668730be (diff)
mtd: nand: remove unused and buggy get_platform_nandchip() helper function
Nobody uses the get_platform_nandchip() helper function which is supposed to return a pointer to a platform_nand_chip struct from an mtd_info pointer. Moreover, this function is buggy since the introduction of the plat_nand layer (chip->priv is now storing a pointer to an intermediate plat_nand_data structure allocated in plat_nand_probe(), and we have no way to retrieve a pointer to the provided platform_nand_chip struct from this plat_nand_data pointer). While we are at it, remove the useless (and buggy, since it's pointing to something stored on the stack) data->chip.priv assignment. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Fixes: 711fdf627ce1 ("[MTD] [NAND] platform NAND driver: add driver") Cc: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/nand.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 2bee2e42ae2f..3e92be1d2d43 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -927,15 +927,6 @@ struct platform_nand_data {
927 struct platform_nand_ctrl ctrl; 927 struct platform_nand_ctrl ctrl;
928}; 928};
929 929
930/* Some helpers to access the data structures */
931static inline
932struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
933{
934 struct nand_chip *chip = mtd->priv;
935
936 return chip->priv;
937}
938
939/* return the supported features. */ 930/* return the supported features. */
940static inline int onfi_feature(struct nand_chip *chip) 931static inline int onfi_feature(struct nand_chip *chip)
941{ 932{