From: Rafał Miłecki Date: Fri, 31 Mar 2017 09:11:48 +0000 (+0200) Subject: mtd: use dev_of_node helper in mtd_get_of_node X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4a67c9fde04fc1b6752fa68c495310ca3ed29eeb;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Boris Brezillon Signed-off-by: Brian Norris --- 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, static inline struct device_node *mtd_get_of_node(struct mtd_info *mtd) { - return mtd->dev.of_node; + return dev_of_node(&mtd->dev); } static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)