mtd: use dev_of_node helper in mtd_get_of_node

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed May 10 19:59:02 PDT 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4a67c9fde04fc1b6752fa68c495310ca3ed29eeb
Commit:     4a67c9fde04fc1b6752fa68c495310ca3ed29eeb
Parent:     8918821f370467937afdda4bf7aa6c9c1a732be5
Author:     Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Fri Mar 31 11:11:48 2017 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Apr 19 11:38:52 2017 -0700

    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 at milecki.pl>
    Acked-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 include/linux/mtd/mtd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index eebdc63..f8db5b2 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)



More information about the linux-mtd-cvs mailing list