diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2017-03-31 05:11:48 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-04-19 14:38:52 -0400 |
commit | 4a67c9fde04fc1b6752fa68c495310ca3ed29eeb (patch) | |
tree | 8d11f7fbb18d107bc80f0ba0c6159ea5501aada6 | |
parent | 8918821f370467937afdda4bf7aa6c9c1a732be5 (diff) |
mtd: use dev_of_node helper in mtd_get_of_node
This allows better compile-time optimizations with CONFIG_OF disabled.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r-- | include/linux/mtd/mtd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index eebdc63cf6af..f8db5b2e4028 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -393,7 +393,7 @@ static inline void mtd_set_of_node(struct mtd_info *mtd, | |||
393 | 393 | ||
394 | static inline struct device_node *mtd_get_of_node(struct mtd_info *mtd) | 394 | static inline struct device_node *mtd_get_of_node(struct mtd_info *mtd) |
395 | { | 395 | { |
396 | return mtd->dev.of_node; | 396 | return dev_of_node(&mtd->dev); |
397 | } | 397 | } |
398 | 398 | ||
399 | static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops) | 399 | static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops) |