Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rafał Miłecki and committed by
Brian Norris
4a67c9fd 8918821f

+1 -1
+1 -1
include/linux/mtd/mtd.h
··· 393 393 394 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 399 static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)